Commit e2cc328e authored by Max Kellermann's avatar Max Kellermann

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.
parent 344d10a8
......@@ -6,6 +6,7 @@ ver 0.18.12 (not yet released)
- audiofile: improve responsiveness
- audiofile: fix WAV stream playback
- dsdiff, dsf: fix stream playback
* randomize next song when enabling "random" mode while not playing
ver 0.18.11 (2014/05/12)
* decoder
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment