From a3e3d2c9506d17b3e19e205535ec263ee75178c9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Oct 2008 22:38:14 +0200 Subject: 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. --- src/update.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/update.c') 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]; -- cgit v1.2.3