Code

screen_outputs: implemented the SCREEN_UPDATE command
authorMax Kellermann <max@duempel.org>
Wed, 30 Sep 2009 19:17:19 +0000 (21:17 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 30 Sep 2009 19:17:19 +0000 (21:17 +0200)
This reloads the output list from MPD.

src/screen_outputs.c

index 7f19ce283fe3c876a971cccb051417d91c7f1f03..c40f470997e15c7d3bb74bb782358c340e229d97 100644 (file)
@@ -204,9 +204,19 @@ outputs_cmd(struct mpdclient *c, command_t cmd)
                return true;
        }
 
-       if (cmd == CMD_PLAY) {
+       switch (cmd) {
+       case CMD_PLAY:
                toggle_output(c, lw->selected);
                return true;
+
+       case CMD_SCREEN_UPDATE:
+               clear_outputs_list();
+               fill_outputs_list(c);
+               outputs_repaint();
+               return true;
+
+       default:
+               break;
        }
 
        return false;