aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue.c
diff options
context:
space:
mode:
authorRomain Bignon <romain@peerfuse.org>2010-05-31 23:32:11 +0200
committerRomain Bignon <romain@peerfuse.org>2010-05-31 23:36:16 +0200
commit867b93a5b2d9c99f35981e3f4622cb2fc06eff99 (patch)
tree701829cdb56111cad1aa1894e17efdbeac89bab8 /src/queue.c
parent53647c8ba1d7ce54a5caa0c7d414926bf4deb249 (diff)
downloadmpd-867b93a5b2d9c99f35981e3f4622cb2fc06eff99.tar.gz
mpd-867b93a5b2d9c99f35981e3f4622cb2fc06eff99.tar.xz
mpd-867b93a5b2d9c99f35981e3f4622cb2fc06eff99.zip
single mode: at the end of the song, pause on the next song instead of stop
Diffstat (limited to 'src/queue.c')
-rw-r--r--src/queue.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/queue.c b/src/queue.c
index d847f1138..dd0b48cb5 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -44,14 +44,9 @@ queue_next_order(const struct queue *queue, unsigned order)
{
assert(order < queue->length);
- if (queue->single)
- {
- if (queue->repeat && !queue->consume)
- return order;
- else
- return -1;
- }
- if (order + 1 < queue->length)
+ if (queue->single && queue->repeat && !queue->consume)
+ return order;
+ else if (order + 1 < queue->length)
return order + 1;
else if (queue->repeat && (order > 0 || !queue->consume))
/* restart at first song */