From 994acefa23d9b02ed1054beffc67ca203b4e5e2b Mon Sep 17 00:00:00 2001 From: Johannes Roos Date: Wed, 22 Oct 2025 21:09:18 +0200 Subject: [PATCH 1/2] FS#13350: PictureFlow: Fix too few albums displayed for first artist Using pf_idx.album_untagged_idx initialized as to -1 instead of 0, we can get rid of buggy duplicate untagged albums while keeping "usable" untagged albums and properly displaying all albums for the first artist when there are no untagged ablums at all. Change-Id: I067ce0bba4ece5e2d9466ffd075af8bf653633b4 --- apps/plugins/pictureflow/pictureflow.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index ff5584cfd5..841281c8e6 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -1398,7 +1398,7 @@ static int create_album_index(void) /* Albums */ pf_idx.album_ct = 0; pf_idx.album_len =0; - pf_idx.album_untagged_idx = 0; + pf_idx.album_untagged_idx = -1; pf_idx.album_untagged_seek = -1; /* album_index starts at end of buf it will be rearranged when finalized */ @@ -1523,16 +1523,8 @@ retry_artist_lookup: /* remove any extra untagged albums * extra space is orphaned till restart */ - for (i = 0; i < pf_idx.album_ct; i++) - { - if (pf_idx.album_index[i].artist_idx > 0) - { - if (i > 0) { i--; } - pf_idx.album_index += i; - pf_idx.album_ct -= i; - break; - } - } + pf_idx.album_index += pf_idx.album_untagged_idx + 1; + pf_idx.album_ct -= pf_idx.album_untagged_idx + 1; pf_idx.buf = buf; pf_idx.buf_sz = buf_size; From 71d2016f4d279ec19167c1eaa072930dc1546deb Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Tue, 14 Oct 2025 13:22:51 +0200 Subject: [PATCH 2/2] shortcuts: Power off while charging if supported Change-Id: I33b9d643053f746d24240ba59a34a1f9c7644f3e --- apps/shortcuts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/shortcuts.c b/apps/shortcuts.c index e99a93ec20..49bb0d45f1 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c @@ -821,7 +821,7 @@ int do_shortcut_menu(void *ignored) run_debug_screen(sc->u.path); break; case SHORTCUT_SHUTDOWN: -#if CONFIG_CHARGING +#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) if (charger_inserted()) charging_splash(); else @@ -829,7 +829,7 @@ int do_shortcut_menu(void *ignored) sys_poweroff(); break; case SHORTCUT_REBOOT: -#if CONFIG_CHARGING +#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) if (charger_inserted()) charging_splash(); else