Playlist: reset song priority on playback

A priority should be a volatile thing: it should schedule a song for
playing back once, but it should not affect the next time the queue
gets played.
This commit is contained in:
Max Kellermann 2014-11-26 08:54:16 +01:00
parent 7519768cb1
commit 12b6959ea2
3 changed files with 7 additions and 1 deletions

1
NEWS
View File

@ -7,6 +7,7 @@ ver 0.20 (not yet released)
- ape: drop support for non-standard tag "album artist"
* output
- pulse: set channel map to WAVE-EX
* reset song priority on playback
ver 0.19.5 (not yet released)
* decoder

View File

@ -240,7 +240,8 @@
bigger than the priority of the current song. Decreasing the
priority of a song will moved it farther to the end of the
sequence. Changing the priority of the current song has no
effect on the sequence.
effect on the sequence. During playback, a song's priority is
reset to zero.
</para>
</section>
</chapter>

View File

@ -64,6 +64,10 @@ void
playlist::SongStarted()
{
assert(current >= 0);
/* reset a song's "priority" when playback starts */
if (queue.SetPriority(queue.OrderToPosition(current), 0, -1, false))
OnModified();
}
inline void