Playlist: randomize next song when enabling "random" mode while not playing
Don't restore the current song after shufflung when MPD is stopped (but still remembers the current song internally). Fixes the first part of Mantis ticket 0004005.
This commit is contained in:
@@ -294,7 +294,9 @@ playlist::SetRandom(PlayerControl &pc, bool status)
|
||||
if (queue.random) {
|
||||
/* shuffle the queue order, but preserve current */
|
||||
|
||||
const int current_position = GetCurrentPosition();
|
||||
const int current_position = playing
|
||||
? GetCurrentPosition()
|
||||
: -1;
|
||||
|
||||
queue.ShuffleOrder();
|
||||
|
||||
|
Reference in New Issue
Block a user