From 8ba08edd0ef5babfee4e603b62e748f15646019b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 16 Jan 2010 20:58:24 +0100 Subject: [PATCH] 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. --- NEWS | 1 + src/queue.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 8c2b0f50e..70eeb3deb 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ ver 0.15.8 (2009/??/??) - ffmpeg, flac, vorbis: added more flac/vorbis MIME types * dbUtils: return empty tag value only if no value was found * decoder_thread: fix CUE track playback +* queue: don't repeat current song in consume mode ver 0.15.7 (2009/12/27) 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