diff options
author | Max Kellermann <max@duempel.org> | 2008-10-14 22:38:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-14 22:38:14 +0200 |
commit | a3e3d2c9506d17b3e19e205535ec263ee75178c9 (patch) | |
tree | 3e93ea6ae33dba8a8f5e12e34629366dcdd7fdb7 /src/update.c | |
parent | 30c86d8ae64ae46ba3bcb1c63e867789feab6dc4 (diff) | |
download | mpd-a3e3d2c9506d17b3e19e205535ec263ee75178c9.tar.gz mpd-a3e3d2c9506d17b3e19e205535ec263ee75178c9.tar.xz mpd-a3e3d2c9506d17b3e19e205535ec263ee75178c9.zip |
command: added command "idle"
"idle" waits until something noteworthy happens on the server,
e.g. song change, playlist modified, database updated. This allows
clients to keep up to date without polling.
Diffstat (limited to '')
-rw-r--r-- | src/update.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/update.c b/src/update.c index 219806a4c..4017842b9 100644 --- a/src/update.c +++ b/src/update.c @@ -30,6 +30,7 @@ #include "main_notify.h" #include "condition.h" #include "update.h" +#include "idle.h" static enum update_progress { UPDATE_PROGRESS_IDLE = 0, @@ -549,8 +550,10 @@ void reap_update_task(void) if (pthread_join(update_thr, NULL)) FATAL("error joining update thread: %s\n", strerror(errno)); - if (modified) + if (modified) { playlistVersionChange(); + idle_add(IDLE_DATABASE); + } if (update_paths_nr) { char *path = update_paths[0]; |