aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/idle.c1
-rw-r--r--src/idle.h3
-rw-r--r--src/update.c5
3 files changed, 9 insertions, 0 deletions
diff --git a/src/idle.c b/src/idle.c
index 11b57376d..c0bb7a908 100644
--- a/src/idle.c
+++ b/src/idle.c
@@ -40,6 +40,7 @@ static const char *const idle_names[] = {
"output",
"options",
"sticker",
+ "update",
NULL
};
diff --git a/src/idle.h b/src/idle.h
index a69acabb0..c8ed57f74 100644
--- a/src/idle.h
+++ b/src/idle.h
@@ -50,6 +50,9 @@ enum {
/** a sticker has been modified. */
IDLE_STICKER = 0x80,
+
+ /** a database update has started or finished. */
+ IDLE_UPDATE = 0x100,
};
/**
diff --git a/src/update.c b/src/update.c
index 1088f5338..d3e3b7650 100644
--- a/src/update.c
+++ b/src/update.c
@@ -822,6 +822,9 @@ directory_update_init(char *path)
return next_task_id > update_task_id_max ? 1 : next_task_id;
}
spawn_update_task(path);
+
+ idle_add(IDLE_UPDATE);
+
return update_task_id;
}
@@ -861,6 +864,8 @@ static void update_finished_event(void)
g_thread_join(update_thr);
+ idle_add(IDLE_UPDATE);
+
if (modified) {
/* send "idle" events */
playlistVersionChange(&g_playlist);