Fixed queue restoring issues

This commit is contained in:
RemixDev 2021-05-21 12:34:39 +02:00
parent b9720ef781
commit b384b4638f
4 changed files with 6 additions and 6 deletions

View File

@ -137,6 +137,7 @@ async function startQueue(dz: any): Promise<any> {
savedObject.status = queue[currentUUID].status
// Save queue status
queue[currentUUID] = savedObject
fs.writeFileSync(configFolder + `queue${sep}${currentUUID}.json`, JSON.stringify(savedObject))
}
console.log(queueOrder)

View File

@ -7,12 +7,11 @@ const path: ApiHandler['path'] = '/getQueue'
// let homeCache: any
const handler: ApiHandler['handler'] = (_, res) => {
const result = {
const result:any = {
queue,
order: queueOrder,
currentItem: ''
order: queueOrder
}
if (currentJob) result.currentItem = currentJob.downloadObject.uuid
if (currentJob) result.currentItem = currentJob.downloadObject.getSlimmedDict()
res.send(result)
}

View File

@ -36,7 +36,7 @@ router.get('/connect', (req, res) => {
queueOrder
}
if (currentJob && currentJob !== true) {
result.queue.current = currentJob.downloadObject.uuid
result.queue.current = currentJob.downloadObject.getSlimmedDict()
}
}

2
webui

@ -1 +1 @@
Subproject commit 3ee56d020b49dd905beb0189de55ce32137da7a1
Subproject commit 122d103959170433d28b6cb1559679ee6b7077a1