mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
fix shuffle mode playback index (#1297)
This commit is contained in:
@@ -2087,7 +2087,12 @@ export const subscribeCurrentTrack = (
|
||||
return usePlayerStoreBase.subscribe(
|
||||
(state) => {
|
||||
const queue = state.getQueue();
|
||||
const index = state.player.index;
|
||||
let index = state.player.index;
|
||||
|
||||
if (isShuffleEnabled(state)) {
|
||||
index = mapShuffledToQueueIndex(index, state.queue.shuffled);
|
||||
}
|
||||
|
||||
return { index, song: queue.items[index] };
|
||||
},
|
||||
(song, prevSong) => {
|
||||
|
||||
Reference in New Issue
Block a user