[feature] playlist. show search progressbar when iterating playlist entries

Change-Id: Ib38363f7495ca523e7cc401c0d39e060ed1705ad
This commit is contained in:
William Wilgus 2024-07-20 00:06:31 -04:00 committed by William Wilgus
parent 82cf845625
commit 072228bb70
4 changed files with 24 additions and 13 deletions

View file

@ -200,7 +200,7 @@ bool warn_on_pl_erase(void)
return true;
}
bool show_search_progress(bool init, int count)
bool show_search_progress(bool init, int display_count, int current, int total)
{
static int last_tick = 0;
@ -214,7 +214,15 @@ bool show_search_progress(bool init, int count)
/* Update progress every 1/10 of a second */
if (TIME_AFTER(current_tick, last_tick + HZ/10))
{
splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), count, str(LANG_OFF_ABORT));
if (total != current)
{
splash_progress(current, total, str(LANG_PLAYLIST_SEARCH_MSG),
display_count, str(LANG_OFF_ABORT));
}
else
splashf(0, str(LANG_PLAYLIST_SEARCH_MSG),
display_count, str(LANG_OFF_ABORT));
if (action_userabort(TIMEOUT_NOBLOCK))
return false;
last_tick = current_tick;