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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user