From 9134169e3792488d6525150e41b8427a3faeda33 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 7 Mar 2010 18:58:44 +0100 Subject: 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. --- src/playlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/playlist.c') diff --git a/src/playlist.c b/src/playlist.c index 35c09329..660dd6a8 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 */ -- cgit v1.2.3