fix broken queue
This commit is contained in:
parent
2f13a09f58
commit
bd45a8cac9
1 changed files with 6 additions and 1 deletions
|
|
@ -685,8 +685,13 @@ export class Player {
|
||||||
const tracks = Array.isArray(trackOrTracks) ? trackOrTracks : [trackOrTracks];
|
const tracks = Array.isArray(trackOrTracks) ? trackOrTracks : [trackOrTracks];
|
||||||
this.queue.push(...tracks);
|
this.queue.push(...tracks);
|
||||||
|
|
||||||
|
if (this.shuffleActive) {
|
||||||
|
this.shuffledQueue.push(...tracks);
|
||||||
|
this.originalQueueBeforeShuffle.push(...tracks);
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.currentTrack || this.currentQueueIndex === -1) {
|
if (!this.currentTrack || this.currentQueueIndex === -1) {
|
||||||
this.currentQueueIndex = this.queue.length - tracks.length;
|
this.currentQueueIndex = this.getCurrentQueue().length - tracks.length;
|
||||||
this.playTrackFromQueue(0, 0);
|
this.playTrackFromQueue(0, 0);
|
||||||
}
|
}
|
||||||
this.saveQueueState();
|
this.saveQueueState();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue