From 4fc38b74ce84249b451f0107392bec92bd92c034 Mon Sep 17 00:00:00 2001 From: Bauke Date: Tue, 25 Oct 2022 14:00:15 +0200 Subject: [PATCH] Also use sortIndex for next queue item. --- source/settings/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/settings/settings.ts b/source/settings/settings.ts index a60ff42..ce65c90 100644 --- a/source/settings/settings.ts +++ b/source/settings/settings.ts @@ -92,7 +92,7 @@ export class Settings { } public nextQueueItem(): Queue.Item | undefined { - return this.queue.sort((a, b) => a.added.getTime() - b.added.getTime())[0]; + return this.queue.sort((a, b) => a.sortIndex - b.sortIndex)[0]; } public async removeQueueItem(id: number): Promise {