aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_artist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-25 21:35:06 +0200
committerMax Kellermann <max@duempel.org>2008-09-25 21:35:06 +0200
commit1198af221ec2d804d9ff840a9dcd5e770fb3d13a (patch)
treeb1be8456ca335ef6b0089e024ab26db6b8d70ba1 /src/screen_artist.c
parent728309e4aeaac71555ce68ffcd3ff92952a270d3 (diff)
downloadmpd-1198af221ec2d804d9ff840a9dcd5e770fb3d13a.tar.gz
mpd-1198af221ec2d804d9ff840a9dcd5e770fb3d13a.tar.xz
mpd-1198af221ec2d804d9ff840a9dcd5e770fb3d13a.zip
screen_browser: added hotkey for adding song
CMD_ADD ('a') appends a song to the playlist, no matter if it is already there, i.e. unlike CMD_SELECT, it does not toggle the song.
Diffstat (limited to '')
-rw-r--r--src/screen_artist.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 71b168841..07a3f8f64 100644
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
@@ -290,6 +290,7 @@ static int
artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
{
char *selected;
+ int ret;
if (browser.filelist == NULL && metalist != NULL &&
list_window_cmd(browser.lw, metalist_length, cmd)) {
@@ -396,6 +397,7 @@ artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
break;
case CMD_SELECT:
+ case CMD_ADD:
switch(mode) {
case LIST_ARTISTS:
selected = g_list_nth_data(metalist,
@@ -423,7 +425,10 @@ artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
break;
case LIST_SONGS:
- if (browser_handle_select(&browser, c) == 0)
+ ret = cmd == CMD_SELECT
+ ? browser_handle_select(&browser, c)
+ : browser_handle_add(&browser, c);
+ if (ret == 0)
/* continue and select next item... */
cmd = CMD_LIST_NEXT;
break;