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.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user