diff options
author | Max Kellermann <max@duempel.org> | 2008-09-25 21:35:06 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-25 21:35:06 +0200 |
commit | 1198af221ec2d804d9ff840a9dcd5e770fb3d13a (patch) | |
tree | b1be8456ca335ef6b0089e024ab26db6b8d70ba1 /src/screen_browser.c | |
parent | 728309e4aeaac71555ce68ffcd3ff92952a270d3 (diff) | |
download | mpd-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 'src/screen_browser.c')
-rw-r--r-- | src/screen_browser.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/screen_browser.c b/src/screen_browser.c index 9ce6fedd8..bad13ea02 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -391,6 +391,17 @@ browser_handle_select(struct screen_browser *browser, mpdclient_t *c) return browser_select_entry(c, entry, TRUE); } +int +browser_handle_add(struct screen_browser *browser, mpdclient_t *c) +{ + struct filelist_entry *entry = browser_get_selected(browser); + + if (entry == NULL || entry->entity == NULL) + return -1; + + return browser_select_entry(c, entry, FALSE); +} + void browser_handle_select_all(struct screen_browser *browser, mpdclient_t *c) { |