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.
This commit is contained in:
parent
90d16af66a
commit
8ba08edd0e
1
NEWS
1
NEWS
|
@ -5,6 +5,7 @@ ver 0.15.8 (2009/??/??)
|
||||||
- ffmpeg, flac, vorbis: added more flac/vorbis MIME types
|
- ffmpeg, flac, vorbis: added more flac/vorbis MIME types
|
||||||
* dbUtils: return empty tag value only if no value was found
|
* dbUtils: return empty tag value only if no value was found
|
||||||
* decoder_thread: fix CUE track playback
|
* decoder_thread: fix CUE track playback
|
||||||
|
* queue: don't repeat current song in consume mode
|
||||||
|
|
||||||
|
|
||||||
ver 0.15.7 (2009/12/27)
|
ver 0.15.7 (2009/12/27)
|
||||||
|
|
|
@ -45,14 +45,14 @@ queue_next_order(const struct queue *queue, unsigned order)
|
||||||
|
|
||||||
if (queue->single)
|
if (queue->single)
|
||||||
{
|
{
|
||||||
if (queue->repeat)
|
if (queue->repeat && !queue->consume)
|
||||||
return order;
|
return order;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (order + 1 < queue->length)
|
if (order + 1 < queue->length)
|
||||||
return order + 1;
|
return order + 1;
|
||||||
else if (queue->repeat)
|
else if (queue->repeat && (order > 0 || !queue->consume))
|
||||||
/* restart at first song */
|
/* restart at first song */
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue