diff options
Diffstat (limited to '')
-rw-r--r-- | src/playlist.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/playlist.c b/src/playlist.c index 776308db0..79f6022a5 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -100,9 +100,13 @@ static void syncPlaylistWithQueue(struct playlist *playlist) /* queued song has started: copy queued to current, and notify the clients */ + int current = playlist->current; playlist->current = playlist->queued; playlist->queued = -1; + if(playlist->queue.consume) + deleteFromPlaylist(playlist, queue_order_to_position(&playlist->queue, current)); + idle_add(IDLE_PLAYER); } } @@ -267,6 +271,12 @@ getPlaylistSingleStatus(const struct playlist *playlist) return playlist->queue.single; } +bool +getPlaylistConsumeStatus(const struct playlist *playlist) +{ + return playlist->queue.consume; +} + void setPlaylistRepeatStatus(struct playlist *playlist, bool status) { if (status == playlist->queue.repeat) @@ -307,6 +317,15 @@ void setPlaylistSingleStatus(struct playlist *playlist, bool status) idle_add(IDLE_OPTIONS); } +void setPlaylistConsumeStatus(struct playlist *playlist, bool status) +{ + if (status == playlist->queue.consume) + return; + + playlist->queue.consume = status; + idle_add(IDLE_OPTIONS); +} + void setPlaylistRandomStatus(struct playlist *playlist, bool status) { const struct song *queued; |