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:
parent
344d10a8e3
commit
e2cc328eef
1
NEWS
1
NEWS
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue