Fixed queue restoring issues
This commit is contained in:
parent
b9720ef781
commit
b384b4638f
@ -137,6 +137,7 @@ async function startQueue(dz: any): Promise<any> {
|
|||||||
savedObject.status = queue[currentUUID].status
|
savedObject.status = queue[currentUUID].status
|
||||||
|
|
||||||
// Save queue status
|
// Save queue status
|
||||||
|
queue[currentUUID] = savedObject
|
||||||
fs.writeFileSync(configFolder + `queue${sep}${currentUUID}.json`, JSON.stringify(savedObject))
|
fs.writeFileSync(configFolder + `queue${sep}${currentUUID}.json`, JSON.stringify(savedObject))
|
||||||
}
|
}
|
||||||
console.log(queueOrder)
|
console.log(queueOrder)
|
||||||
|
@ -7,12 +7,11 @@ const path: ApiHandler['path'] = '/getQueue'
|
|||||||
// let homeCache: any
|
// let homeCache: any
|
||||||
|
|
||||||
const handler: ApiHandler['handler'] = (_, res) => {
|
const handler: ApiHandler['handler'] = (_, res) => {
|
||||||
const result = {
|
const result:any = {
|
||||||
queue,
|
queue,
|
||||||
order: queueOrder,
|
order: queueOrder
|
||||||
currentItem: ''
|
|
||||||
}
|
}
|
||||||
if (currentJob) result.currentItem = currentJob.downloadObject.uuid
|
if (currentJob) result.currentItem = currentJob.downloadObject.getSlimmedDict()
|
||||||
|
|
||||||
res.send(result)
|
res.send(result)
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ router.get('/connect', (req, res) => {
|
|||||||
queueOrder
|
queueOrder
|
||||||
}
|
}
|
||||||
if (currentJob && currentJob !== true) {
|
if (currentJob && currentJob !== true) {
|
||||||
result.queue.current = currentJob.downloadObject.uuid
|
result.queue.current = currentJob.downloadObject.getSlimmedDict()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
webui
2
webui
@ -1 +1 @@
|
|||||||
Subproject commit 3ee56d020b49dd905beb0189de55ce32137da7a1
|
Subproject commit 122d103959170433d28b6cb1559679ee6b7077a1
|
Loading…
Reference in New Issue
Block a user