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.
This commit is contained in:
Max Kellermann 2010-03-07 18:58:44 +01:00
parent 35c5a371ea
commit 9134169e37
2 changed files with 3 additions and 1 deletions

1
NEWS
View File

@ -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)

View File

@ -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 */