inotify: added setting "auto_update_depth"

Limits the depth of the watched directories.  This is useful to keep
resource usage down and speed up MPD startup.
This commit is contained in:
Max Kellermann
2010-04-13 21:01:19 +02:00
parent 4d1eedbaa2
commit 393bcd961a
7 changed files with 44 additions and 8 deletions

View File

@@ -379,7 +379,8 @@ int main(int argc, char *argv[])
success = config_get_bool(CONF_AUTO_UPDATE, false);
#ifdef ENABLE_INOTIFY
if (success && mapper_has_music_directory())
mpd_inotify_init();
mpd_inotify_init(config_get_unsigned(CONF_AUTO_UPDATE_DEPTH,
G_MAXUINT));
#else
if (success)
g_warning("inotify: auto_update was disabled. enable during compilation phase");