From 8a2269fed3411353d9d65662c8c746ea9cfb7a50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sat, 24 Apr 2010 10:13:19 +0100 Subject: [PATCH] screen_lyrics: handle the spacebar screen_help says that the lyrics can be reloaded using the spacebar (CMD_SELECT). This patch implements the documented behavior. --- src/screen_lyrics.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index 152b38d..7f5d47c 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -321,6 +321,14 @@ lyrics_cmd(struct mpdclient *c, command_t cmd) screen_text_repaint(&text); } return true; + case CMD_SELECT: + if (current.loader == NULL && current.artist != NULL && + current.title != NULL) { + current.loader = lyrics_load(current.artist, current.title, + screen_lyrics_callback, NULL); + screen_text_repaint(&text); + } + return true; #ifdef ENABLE_SONG_SCREEN case CMD_SCREEN_SONG: -- 2.30.2