aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-23 00:07:10 +0100
committerMax Kellermann <max@duempel.org>2009-01-23 00:07:10 +0100
commit9cad342056cf041b3696cdfae408b6c9c7315e1c (patch)
tree05f2cb10e866677e5ef3f46cff074d9e6d1253dd /src
parent144a91cace5a6342179a9d20804768123b548dfa (diff)
downloadmpd-9cad342056cf041b3696cdfae408b6c9c7315e1c.tar.gz
mpd-9cad342056cf041b3696cdfae408b6c9c7315e1c.tar.xz
mpd-9cad342056cf041b3696cdfae408b6c9c7315e1c.zip
playlist: recalculate the queued song after random is toggled
When the random mode is toggled, MPD did not clear the queue. Because of this, MPD continued with the next (random or non-random) song according to the previous mode. Clear the queued song to fix that.
Diffstat (limited to 'src')
-rw-r--r--src/playlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 3f18f6b81..cce2924c1 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -951,6 +951,9 @@ void setPlaylistRandomStatus(bool status)
if (status == playlist.queue.random)
return;
+ if (playlist.queued >= 0)
+ clearPlayerQueue();
+
playlist.queue.random = status;
if (playlist.queue.random) {