Also use sortIndex for next queue item.

This commit is contained in:
Bauke 2022-10-25 14:00:15 +02:00
parent 913e8f0da9
commit 4fc38b74ce
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 1 additions and 1 deletions

View File

@ -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<void> {