From 299a27c8dee0e7eeab3448ed7cdfe1ac7c97ebaf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 18 Nov 2008 21:51:57 +0100 Subject: 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. --- src/screen_browser.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/screen_browser.c') diff --git a/src/screen_browser.c b/src/screen_browser.c index 6a5bbd233..63e8c1c71 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -531,6 +531,15 @@ browser_cmd(struct screen_browser *browser, return true; #endif + case CMD_LOCATE: + entry = browser_get_selected(browser); + if (entry == NULL || entry->entity == NULL || + entry->entity->type != MPD_INFO_ENTITY_TYPE_SONG) + return false; + + screen_file_goto_song(c, entry->entity->info.song); + return true; + #ifdef ENABLE_LYRICS_SCREEN case CMD_SCREEN_LYRICS: entry = browser_get_selected(browser); -- cgit v1.2.3