playlist: check if repeat mode changes

Add a "changed" check to setPlaylistRepeatStatus(): when the new
repeat mode is the same as the old one, don't do anything at all.  No
more checks, no "idle" event.
This commit is contained in:
Max Kellermann 2009-01-23 00:07:20 +01:00
parent 9cad342056
commit fb2ef107d1

View File

@ -828,8 +828,11 @@ bool getPlaylistRandomStatus(void)
void setPlaylistRepeatStatus(bool status)
{
if (status == playlist.queue.repeat)
return;
if (playlist_state == PLAYLIST_STATE_PLAY &&
playlist.queue.repeat && !status && playlist.queued == 0)
playlist.queue.repeat && playlist.queued == 0)
clearPlayerQueue();
playlist.queue.repeat = status;