PictureFlow: remember inspected album artwork
Each time PictureFlow was launched, it would rebuild the album artwork cache from the beginning. Depending on the number of albums, this could take a while and resulted in choppy scrolling. PictureFlow will now remember how many albums have been inspected already, and only rescan and write new artwork when the album index cache gets updated or rebuilt. Change-Id: Icd78106dacea44b80904ac609caa355cc9113168
This commit is contained in:
parent
687096e3f5
commit
a7d09f8104
1 changed files with 2 additions and 0 deletions
|
@ -451,6 +451,7 @@ static struct configdata config[] =
|
||||||
{ TYPE_INT, 0, 999999, { .int_p = &pf_cfg.last_album }, "last album", NULL },
|
{ TYPE_INT, 0, 999999, { .int_p = &pf_cfg.last_album }, "last album", NULL },
|
||||||
{ TYPE_INT, 0, 1, { .int_p = &pf_cfg.backlight_mode }, "backlight", NULL },
|
{ TYPE_INT, 0, 1, { .int_p = &pf_cfg.backlight_mode }, "backlight", NULL },
|
||||||
{ TYPE_INT, 0, 999999, { .int_p = &aa_cache.idx }, "art cache pos", NULL },
|
{ TYPE_INT, 0, 999999, { .int_p = &aa_cache.idx }, "art cache pos", NULL },
|
||||||
|
{ TYPE_INT, 0, 999999, { .int_p = &aa_cache.inspected }, "art cache inspected", NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata))
|
#define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata))
|
||||||
|
@ -2002,6 +2003,7 @@ static bool create_albumart_cache(void)
|
||||||
{
|
{
|
||||||
draw_splashscreen(pf_idx.buf, pf_idx.buf_sz);
|
draw_splashscreen(pf_idx.buf, pf_idx.buf_sz);
|
||||||
draw_progressbar(0, pf_idx.album_ct, "Preparing artwork");
|
draw_progressbar(0, pf_idx.album_ct, "Preparing artwork");
|
||||||
|
aa_cache.inspected = 0;
|
||||||
for (int i=0; i < pf_idx.album_ct; i++)
|
for (int i=0; i < pf_idx.album_ct; i++)
|
||||||
{
|
{
|
||||||
incremental_albumart_cache(true);
|
incremental_albumart_cache(true);
|
||||||
|
|
Loading…
Reference in a new issue