chiark / gitweb /
build fix
[disorder] / disobedience / log.c
index 11bad246f396051dd8a5891d9ecaae70ed6cb123..83aa5826b92323021848a64de7390bc88b11ff2a 100644 (file)
@@ -41,6 +41,7 @@ static void log_removed(void *v, const char *id, const char *user);
 static void log_scratched(void *v, const char *track, const char *user);
 static void log_state(void *v, unsigned long state);
 static void log_volume(void *v, int l, int r);
+static void log_rescanned(void *v);
 
 /** @brief Callbacks for server state monitoring */
 const disorder_eclient_log_callbacks log_callbacks = {
@@ -55,7 +56,8 @@ const disorder_eclient_log_callbacks log_callbacks = {
   log_removed,
   log_scratched,
   log_state,
-  log_volume
+  log_volume,
+  log_rescanned
 };
 
 /** @brief State monitor
@@ -84,6 +86,7 @@ void all_update(void) {
   queue_update();
   recent_update();
   volume_update();
+  added_update();
 }
 
 /** @brief Called when the client connects
@@ -148,6 +151,7 @@ static void log_recent_removed(void attribute((unused)) *v,
 static void log_removed(void attribute((unused)) *v,
                         const char attribute((unused)) *id,
                         const char attribute((unused)) *user) {
+
   queue_update();
 }
 
@@ -190,6 +194,11 @@ static void log_volume(void attribute((unused)) *v,
   }
 }
 
+/** @brief Called when a rescan completes */
+static void log_rescanned(void attribute((unused)) *v) {
+  added_update();
+}
+
 /** @brief Add a monitor to the list
  * @param callback Function to call
  * @param u User data to pass to @p callback