fix: artist page song clicks bypass shuffle — play exact song in order
This commit is contained in:
1 parent
64c107da0b
commit
4e6f8782ca
2 files changed
+4
-3
No files matched your search
+3
-2
@@ -356,14 +356,15 @@ let _playGen = 0;
|
||||
// from the previous queue can detect they're stale and bail out.
|
||||
let _queueGen = 0;
|
||||
|
||||
export function playQueue(songs, startIdx) {
|
||||
export function playQueue(songs, startIdx, opts = {}) {
|
||||
_queueGen++;
|
||||
_radioFilling = false; // cancel any in-flight radio fill for the old queue
|
||||
S._origQueue = null;
|
||||
_histClear();
|
||||
// Shuffle: fully random order, no pinning — startIdx is ignored.
|
||||
// Both web and Android traverse this fixed shuffled order sequentially.
|
||||
if (S.shuffle && songs.length > 1) {
|
||||
// opts.noShuffle = true skips shuffle (e.g. clicking a specific song on the artist page).
|
||||
if (S.shuffle && songs.length > 1 && !opts.noShuffle) {
|
||||
S._origQueue = songs.map(s => ({...s}));
|
||||
S.queue = [...songs].sort(() => Math.random() - 0.5).map(s => ({...s}));
|
||||
S.qIdx = 0;
|
||||
|
||||
Reference in new issue
Block a user