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:
parent
9cad342056
commit
fb2ef107d1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user