1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-15 02:11:35 +01:00

Shuffle all songs instead of from the current to the end

Fixes #707
This commit is contained in:
Jonas Kvinge 2021-05-04 22:48:18 +02:00
parent 240dcf2e5c
commit 316a3d51ee

View File

@ -1875,11 +1875,8 @@ void Playlist::ReshuffleIndices() {
return; return;
} }
// If the user is already playing a song, advance the begin iterator to only shuffle items that haven't been played yet.
QList<int>::iterator begin = virtual_items_.begin(); QList<int>::iterator begin = virtual_items_.begin();
QList<int>::iterator end = virtual_items_.end(); QList<int>::iterator end = virtual_items_.end();
if (current_virtual_index_ != -1)
std::advance(begin, current_virtual_index_ + 1);
std::random_device rd; std::random_device rd;
std::mt19937 g(rd()); std::mt19937 g(rd());