Added autostart queue after login
This commit is contained in:
parent
b384b4638f
commit
6f7808c91b
@ -94,7 +94,7 @@ export async function addToQueue(dz: any, url: string[], bitrate: number) {
|
||||
return slimmedObjects
|
||||
}
|
||||
|
||||
async function startQueue(dz: any): Promise<any> {
|
||||
export async function startQueue(dz: any): Promise<any> {
|
||||
do {
|
||||
if (currentJob !== null || queueOrder.length === 0) {
|
||||
// Should not start another download
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { RequestHandler } from 'express'
|
||||
// @ts-expect-error
|
||||
import { Deezer } from 'deezer-js'
|
||||
import { sessionDZ } from '../../../main'
|
||||
import { sessionDZ, startQueue } from '../../../main'
|
||||
import { ApiHandler } from '../../../types'
|
||||
|
||||
export interface RawLoginArlQuery {
|
||||
@ -58,6 +58,7 @@ const handler: RequestHandler<{}, {}, {}, RawLoginArlQuery> = async (req, res, n
|
||||
const returnValue = { status: response, arl: req.query.arl, user: dz.current_user }
|
||||
|
||||
res.status(200).send(returnValue)
|
||||
startQueue(dz)
|
||||
next()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user