From fb2ef107d1b43d5ba34918059113ec68293d379e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 23 Jan 2009 00:07:20 +0100 Subject: 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. --- src/playlist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3