aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-03-07 18:58:44 +0100
committerMax Kellermann <max@duempel.org>2010-03-07 18:58:44 +0100
commit9134169e3792488d6525150e41b8427a3faeda33 (patch)
tree51f03948f23f570a7059375fbb4b5163e80be60f
parent35c5a371ea3530796e88bcdd556e488816dff20f (diff)
downloadmpd-9134169e3792488d6525150e41b8427a3faeda33.tar.gz
mpd-9134169e3792488d6525150e41b8427a3faeda33.tar.xz
mpd-9134169e3792488d6525150e41b8427a3faeda33.zip
playlist: fix single+repeat in random mode
With single+repeat enabled, it is expected that MPD repeats the current song over andd over. With random mode also enabled, this didn't work, because the song order was shuffled internally. This patch adds a special check for this case.
-rw-r--r--NEWS1
-rw-r--r--src/playlist.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 476553ff5..7723350ff 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
ver 0.15.9 (2009/??/??)
* decoders:
- mad: fix crash when seeking at end of song
+* playlist: fix single+repeat in random mode
ver 0.15.8 (2010/01/17)
diff --git a/src/playlist.c b/src/playlist.c
index 35c09329a..660dd6a83 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -140,7 +140,8 @@ playlist_update_queued_song(struct playlist *playlist, const struct song *prev)
? queue_next_order(&playlist->queue, playlist->current)
: 0;
- if (next_order == 0 && playlist->queue.random) {
+ if (next_order == 0 && playlist->queue.random &&
+ !playlist->queue.single) {
/* shuffle the song order again, so we get a different
order each time the playlist is played
completely */