diff options
author | Max Kellermann <max@duempel.org> | 2008-11-18 21:51:57 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-18 21:51:57 +0100 |
commit | 299a27c8dee0e7eeab3448ed7cdfe1ac7c97ebaf (patch) | |
tree | 45768e3972318fb475c65a5866c5bbedd09da8a3 /src/screen_play.c | |
parent | ebb9e5b1924e6bc5baaae9ced82b54be586f6b74 (diff) | |
download | mpd-299a27c8dee0e7eeab3448ed7cdfe1ac7c97ebaf.tar.gz mpd-299a27c8dee0e7eeab3448ed7cdfe1ac7c97ebaf.tar.xz mpd-299a27c8dee0e7eeab3448ed7cdfe1ac7c97ebaf.zip |
command: added CMD_LOCATE to locate song in database
Pressing 'l' switches to the file browser (screen_file) and locates
the previously selected song in the server's database.
Diffstat (limited to 'src/screen_play.c')
-rw-r--r-- | src/screen_play.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/screen_play.c b/src/screen_play.c index 4c21a1769..1e0dcaa28 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -554,6 +554,14 @@ play_cmd(mpdclient_t *c, command_t cmd) return handle_mouse_event(c); #endif + case CMD_LOCATE: + if (lw->selected < playlist_length(&c->playlist)) { + screen_file_goto_song(c, playlist_get(&c->playlist, lw->selected)); + return true; + } + + break; + #ifdef ENABLE_LYRICS_SCREEN case CMD_SCREEN_LYRICS: if (lw->selected < playlist_length(&c->playlist)) { |