From c02ddfbc9f231a7e92986ea176e20d48cc663a53 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Tue, 8 Mar 2022 16:07:20 +0100 Subject: [PATCH] Fixed restore of corrupted queue --- server/src/app.ts | 5 +++++ webui | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/app.ts b/server/src/app.ts index e104d96..d078bb6 100644 --- a/server/src/app.ts +++ b/server/src/app.ts @@ -234,6 +234,11 @@ export class DeemixApp { do { currentUUID = this.queueOrder.shift() || '' } while (this.queue[currentUUID] === undefined && this.queueOrder.length) + if (this.queue[currentUUID] === undefined) { + fs.writeFileSync(configFolder + `queue${sep}order.json`, JSON.stringify(this.queueOrder)) + this.currentJob = null + return null + } this.queue[currentUUID].status = 'downloading' const currentItem: any = JSON.parse(fs.readFileSync(configFolder + `queue${sep}${currentUUID}.json`).toString()) let downloadObject: any diff --git a/webui b/webui index 6d5c52e..283bb5f 160000 --- a/webui +++ b/webui @@ -1 +1 @@ -Subproject commit 6d5c52eabf960f86f8a4abe1d9654f619b0fbb81 +Subproject commit 283bb5fa0df7042c78919f64c1c6638996ca6ac8