mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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:
parent
be47d646f0
commit
93b1611474
5 changed files with 57 additions and 23 deletions
|
@ -286,8 +286,8 @@ static int add_track_to_playlist(char* filename, void* context)
|
|||
|
||||
/* Add "sel" file into specified "playlist". How to insert depends on type
|
||||
of file */
|
||||
static int add_to_playlist(const char* playlist, bool new_playlist,
|
||||
const char* sel, int sel_attr)
|
||||
int catalog_insert_into(const char* playlist, bool new_playlist,
|
||||
const char* sel, int sel_attr)
|
||||
{
|
||||
int fd;
|
||||
int result = -1;
|
||||
|
@ -514,7 +514,7 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr,
|
|||
result = ctx_add_to_playlist(playlist, new_playlist);
|
||||
}
|
||||
else
|
||||
result = add_to_playlist(playlist, new_playlist, sel, sel_attr);
|
||||
result = catalog_insert_into(playlist, new_playlist, sel, sel_attr);
|
||||
|
||||
return (result == 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue