Code

screen_lyrics: some cleanup
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 24 Apr 2010 09:01:23 +0000 (10:01 +0100)
committerMax Kellermann <max@duempel.org>
Sun, 25 Apr 2010 18:23:10 +0000 (20:23 +0200)
src/screen_lyrics.c

index 4d1122b4b290e64ee9a73b6e22ab4a543a6adb28..152b38d30dd28311a010222c2ab21be0dd2097ef 100644 (file)
@@ -303,25 +303,18 @@ lyrics_cmd(struct mpdclient *c, command_t cmd)
                        screen_status_message (_("Lyrics saved"));
                return true;
        case CMD_DELETE:
-               {
-                       int success;
-
-                       if (current.loader == NULL && current.artist != NULL &&
-                           current.title != NULL) {
-                               success = delete_lyr_hd();
-                               switch (success) {
-                               case 0:
-                                       screen_status_message
-                                               (_("Lyrics deleted"));
-                                       break;
-                               case -1:
-                                       screen_status_message
-                                               (_("No saved lyrics"));
-                                       break;
-                               }
+               if (current.loader == NULL && current.artist != NULL &&
+                   current.title != NULL) {
+                       switch (delete_lyr_hd()) {
+                       case 0:
+                               screen_status_message (_("Lyrics deleted"));
+                               break;
+                       case -1:
+                               screen_status_message (_("No saved lyrics"));
+                               break;
                        }
-                       return true;
                }
+               return true;
        case CMD_LYRICS_UPDATE:
                if (c->song != NULL) {
                        screen_lyrics_load(c->song);