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 {