aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-23 00:07:20 +0100
committerMax Kellermann <max@duempel.org>2009-01-23 00:07:20 +0100
commitfb2ef107d1b43d5ba34918059113ec68293d379e (patch)
tree476a5efeea87273e3b03ec3476a09b6d00482d3e /src
parent9cad342056cf041b3696cdfae408b6c9c7315e1c (diff)
downloadmpd-fb2ef107d1b43d5ba34918059113ec68293d379e.tar.gz
mpd-fb2ef107d1b43d5ba34918059113ec68293d379e.tar.xz
mpd-fb2ef107d1b43d5ba34918059113ec68293d379e.zip
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.
Diffstat (limited to '')
-rw-r--r--src/playlist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index cce2924c1..fb56721a3 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -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;