diff options
author | Romain Bignon <romain@peerfuse.org> | 2009-03-27 15:28:49 +0100 |
---|---|---|
committer | Romain Bignon <romain@peerfuse.org> | 2009-03-27 15:28:49 +0100 |
commit | e7519829ac588e4b261c1832bb0e7d6ffbd47322 (patch) | |
tree | ec9ab205b3a4344b76dcd60dddc8496ed8357cde /src/queue.c | |
parent | e46722b2ebe05fce63bc7b86100c159b5cadd297 (diff) | |
download | mpd-e7519829ac588e4b261c1832bb0e7d6ffbd47322.tar.gz mpd-e7519829ac588e4b261c1832bb0e7d6ffbd47322.tar.xz mpd-e7519829ac588e4b261c1832bb0e7d6ffbd47322.zip |
renamed smartstop to single and changed behavior
When single mode is enabled, after current song it stops playback,
or it replay same song if repeat mode is activated.
Diffstat (limited to 'src/queue.c')
-rw-r--r-- | src/queue.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/queue.c b/src/queue.c index 28da0e5a3..21d4884c6 100644 --- a/src/queue.c +++ b/src/queue.c @@ -40,8 +40,13 @@ queue_next_order(const struct queue *queue, unsigned order) { assert(order < queue->length); - if (queue->smartstop) - return -1; + if (queue->single) + { + if (queue->repeat) + return order; + else + return -1; + } if (order + 1 < queue->length) return order + 1; else if (queue->repeat) @@ -277,7 +282,7 @@ queue_init(struct queue *queue, unsigned max_length) queue->version = 1; queue->repeat = false; queue->random = false; - queue->smartstop = false; + queue->single = false; queue->items = g_new(struct queue_item, max_length); queue->order = g_malloc(sizeof(queue->order[0]) * |