diff options
author | Max Kellermann <max@duempel.org> | 2012-08-25 10:28:33 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-25 10:28:33 +0200 |
commit | def21cc87ef8eb1ee78be1235a2de73ed253fcaf (patch) | |
tree | 056616e05ab4d115c0415abe048a74bd6f6c857c /src/playlist.c | |
parent | 488c1eb87b1b484da67ea0ccbb360bf1a6968003 (diff) | |
parent | acaa725478ae5e6e4fff9e07cf8637d17d314c41 (diff) | |
download | mpd-def21cc87ef8eb1ee78be1235a2de73ed253fcaf.tar.gz mpd-def21cc87ef8eb1ee78be1235a2de73ed253fcaf.tar.xz mpd-def21cc87ef8eb1ee78be1235a2de73ed253fcaf.zip |
Merge branch 'v0.17.x'
Conflicts:
src/queue_save.c
Diffstat (limited to '')
-rw-r--r-- | src/playlist.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/playlist.c b/src/playlist.c index 4d4f0c1f6..71abcb692 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -110,11 +110,6 @@ playlist_song_started(struct playlist *playlist, struct player_control *pc) playlist->current = playlist->queued; playlist->queued = -1; - /* Pause if we are in single mode. */ - if(playlist->queue.single && !playlist->queue.repeat) { - pc_set_pause(pc, true); - } - if(playlist->queue.consume) playlist_delete(playlist, pc, queue_order_to_position(&playlist->queue, @@ -311,7 +306,11 @@ playlist_set_repeat(struct playlist *playlist, struct player_control *pc, if (status == playlist->queue.repeat) return; - playlist->queue.repeat = status; + struct queue *queue = &playlist->queue; + + queue->repeat = status; + + pc_set_border_pause(pc, queue->single && !queue->repeat); /* if the last song is currently being played, the "next song" might change when repeat mode is toggled */ @@ -339,7 +338,11 @@ playlist_set_single(struct playlist *playlist, struct player_control *pc, if (status == playlist->queue.single) return; - playlist->queue.single = status; + struct queue *queue = &playlist->queue; + + queue->single = status; + + pc_set_border_pause(pc, queue->single && !queue->repeat); /* if the last song is currently being played, the "next song" might change when single mode is toggled */ |