tagtree: defer context menu disk access

When the database isn't loaded into RAM,
or the "quick" load setting is enabled,
filenames for tracks must be retrieved
from disk.

With a single track selected, this
can cause a delay before its context
menu is displayed.

Since filenames are only needed after the
user has selected something from the menu,
it makes sense to defer retrieval until
disk access becomes inevitable.

Change-Id: I72b57eff3102b50f3e19441119e20aad903b1f2b
This commit is contained in:
Christian Soffke 2025-04-14 23:00:22 +02:00 committed by Solomon Peachy
parent be47d646f0
commit 93b1611474
5 changed files with 57 additions and 23 deletions

View file

@ -27,7 +27,7 @@ void catalog_get_directory(char* dirbuf, size_t dirbuf_sz);
/* Set the playlist catalog dir */
void catalog_set_directory(const char* directory);
/*
/*
* View list of playlists in catalog.
* ret : true if item was selected
*/
@ -36,7 +36,10 @@ bool catalog_view_playlists(void);
bool catalog_pick_new_playlist_name(char *pl_name, size_t buf_size,
const char* curr_pl_name);
/*
int catalog_insert_into(const char* playlist, bool new_playlist,
const char* sel, int sel_attr);
/*
* Add something to a playlist (new or select from list of playlists in
* catalog).
* sel : the path of the music file, playlist or directory to add