aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/Playlist.cxx4
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index b67eb9314..afd37bb75 100644
--- a/NEWS
+++ b/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
diff --git a/src/Playlist.cxx b/src/Playlist.cxx
index 8d9ab24a3..ac2cc494b 100644
--- a/src/Playlist.cxx
+++ b/src/Playlist.cxx
@@ -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();