summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2023-06-23 18:55:13 +0200
committerChristian Soffke <christian.soffke@gmail.com>2023-06-29 17:09:15 -0400
commit129fb4016bb081d9fc204fb66aa56cd4955e868e (patch)
treef7b3de4ce9bc1d7190f4c97cfaa11b678f3d76f8
parent207a7fe448fccaead498f65ff77ec6af3c20dd02 (diff)
downloadrockbox-129fb4016b.tar.gz
rockbox-129fb4016b.zip
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
-rw-r--r--apps/onplay.c2
1 files changed, 1 insertions, 1 deletions
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);
}