aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-16 20:58:24 +0100
committerMax Kellermann <max@duempel.org>2010-01-16 20:58:24 +0100
commit8ba08edd0ef5babfee4e603b62e748f15646019b (patch)
tree28825ccde86ce335ba0f61d8a96f3392d6512ec3 /src/queue.c
parent90d16af66adfe1ef9d3fc07fe7b238f3c02adaaf (diff)
downloadmpd-8ba08edd0ef5babfee4e603b62e748f15646019b.tar.gz
mpd-8ba08edd0ef5babfee4e603b62e748f15646019b.tar.xz
mpd-8ba08edd0ef5babfee4e603b62e748f15646019b.zip
queue: don't repeat current song in consume mode
Check consume mode in queue_next_order(), because the current song would be deleted as soon as it's finished; it cannot be played again.
Diffstat (limited to '')
-rw-r--r--src/queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/queue.c b/src/queue.c
index 141222a80..16891d0aa 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -45,14 +45,14 @@ queue_next_order(const struct queue *queue, unsigned order)
if (queue->single)
{
- if (queue->repeat)
+ if (queue->repeat && !queue->consume)
return order;
else
return -1;
}
if (order + 1 < queue->length)
return order + 1;
- else if (queue->repeat)
+ else if (queue->repeat && (order > 0 || !queue->consume))
/* restart at first song */
return 0;
else