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:
8a22d2678a/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
This commit is contained in:
Christian Soffke 2023-06-23 18:55:13 +02:00
parent 207a7fe448
commit 129fb4016b

View file

@ -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);
}