fix(frontend): make add-to-queue insert the track to play next

It previously appended to the end of the queue; 'Añadir a la cola' is expected to mean the track plays right after the current one, so it now splices in right after the currently playing track's index.
This commit is contained in:
2026-07-16 22:44:51 +02:00
parent 63f7253714
commit 7532511e1f
+3 -1
View File
@@ -338,7 +338,9 @@ class PlayerState {
this.playQueue([item], 0);
return;
}
this.tracks = [...this.tracks, toTrack(item)];
const tracks = [...this.tracks];
tracks.splice(this.#index() + 1, 0, toTrack(item));
this.tracks = tracks;
}
playTrack(id: string | number) {