]> Untitled Git - mpdstream/commitdiff
Test MPD_IDLE_QUEUE
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Wed, 1 Apr 2026 23:24:35 +0000 (19:24 -0400)
committerHugo Villeneuve <hvilleneuve@dimonoff.com>
Wed, 1 Apr 2026 23:38:25 +0000 (19:38 -0400)
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
src/main.c

index 8cf0d0a1d7f34042dbe0ee7b45e67c9fce932ec3..7eb99dfec99fcf689fe0292ba0f64a40ea70966f 100644 (file)
@@ -181,11 +181,14 @@ main(int argc, char **argv)
                 * Wait for specified event(s):
                 *   MPD_IDLE_PLAYER: state has changed: play, stop, pause, seek, etc
                 */
-               mask = mpd_run_idle_mask(mpdc, MPD_IDLE_PLAYER);
+               mask = mpd_run_idle_mask(mpdc, MPD_IDLE_PLAYER | MPD_IDLE_QUEUE);
                if (mask == 0) {
                        (void) mpd_check_for_error();
                        log_warn("Empty idle event");
                        continue; /* Or abort/break? */
+               } else if (mask &= ~MPD_IDLE_QUEUE) {
+                       log_debug("MPD_IDLE_QUEUE idle event");
+                       continue;
                }
 
                status = mpd_run_status(mpdc);