Code

screen_artist: call artist_lw_cmd() at the end of artist_cmd()
authorMax Kellermann <max@duempel.org>
Thu, 2 Oct 2008 13:20:18 +0000 (15:20 +0200)
committerMax Kellermann <max@duempel.org>
Thu, 2 Oct 2008 13:20:18 +0000 (15:20 +0200)
By calling artist_lw_cmd() after the big switch, we can override
behaviour, and we can modify the command.

src/screen_artist.c

index b15b89dbbf7221a829879304e3e02130463d5932..c9c6f9b019a1acc4e569f8aebe8cc07d361f2796 100644 (file)
@@ -450,11 +450,6 @@ artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
        char *selected;
        int ret;
 
-       if (artist_lw_cmd(cmd)) {
-               artist_repaint();
-               return 1;
-       }
-
        switch(cmd) {
        case CMD_PLAY:
                switch (mode) {
@@ -624,6 +619,11 @@ artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
                break;
        }
 
+       if (artist_lw_cmd(cmd)) {
+               artist_repaint();
+               return 1;
+       }
+
        return 0;
 }