aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-04-08 22:31:51 +0200
committerMax Kellermann <max@duempel.org>2013-04-08 23:11:36 +0200
commitdca111519627813608807b60b98f3d5133880120 (patch)
treee19e6733975211a71a0b5b646c4a086be03d7bd1 /src/Main.cxx
parent96882175f15230fe2cf9b4e7f3a7f29b5697fe26 (diff)
downloadmpd-dca111519627813608807b60b98f3d5133880120.tar.gz
mpd-dca111519627813608807b60b98f3d5133880120.tar.xz
mpd-dca111519627813608807b60b98f3d5133880120.zip
StateFile: schedule timer only after a change
Save the state file 2 minutes after the last change. This reduces the disruptions by an idle MPD, and MPD can be paged out permanently until it is used.
Diffstat (limited to '')
-rw-r--r--src/Main.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 9b6630d60..322f4d618 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -347,6 +347,9 @@ idle_event_emitted(void)
unsigned flags = idle_get();
if (flags != 0)
client_list->IdleAdd(flags);
+
+ if (flags & (IDLE_PLAYLIST|IDLE_PLAYER|IDLE_MIXER|IDLE_OUTPUT))
+ state_file->CheckModified();
}
/**