From 129fb4016bb081d9fc204fb66aa56cd4955e868e Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Fri, 23 Jun 2023 18:55:13 +0200 Subject: Tagtree 'Play Next' Menu: Eliminate redundant filename retrieval The file name for a track in the database has been retrieved already, before its context menu is displayed, or a hotkey is executed, see: https://github.com/Rockbox/rockbox/blob/8a22d2678a9fff97fd159a4b2eb45e637f08c79f/apps/tree.c#L811 So, skip over tagtree_current_playlist_insert and instead use playlist_insert_track() directly, when user selects something from the "Playing Next" menu or uses a hotkey. Change-Id: Ie0789d8314949e9872bf261634d81b96432ccda3 --- apps/onplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/onplay.c b/apps/onplay.c index a9cbc64598..26a2614b56 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -626,7 +626,7 @@ static int add_to_playlist(void* arg) } #ifdef HAVE_TAGCACHE - if (context == CONTEXT_ID3DB) + if ((context == CONTEXT_ID3DB) && (selected_file_attr & ATTR_DIRECTORY)) { tagtree_current_playlist_insert(position, queue); } -- cgit v1.2.3