diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-11-19 05:11:13 +0100 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-01-22 08:29:40 -0500 |
commit | bc5a6385949c9f0a17173f3512aa9a6db9175803 (patch) | |
tree | b7b2990a4a43d6027f19cbe32a22cd2f0774d0b1 /apps/shortcuts.c | |
parent | aafe2dd2d14e1ce88b5c9c819277ca0bc98af6e5 (diff) | |
download | rockbox-bc5a6385949c9f0a17173f3512aa9a6db9175803.tar.gz rockbox-bc5a6385949c9f0a17173f3512aa9a6db9175803.zip |
Option to switch off album art or to prefer file over embedded
Large embedded album art can cause pauses during
playback or when skipping between tracks, especially
on older devices, but embedded art is currently loaded
even when separately stored smaller image files would be
available.
A workaround is to remove large album art from the
metadata of files.
This now adds a setting to either turn off loading of
album art completely, or to prefer loading the album art
from a separate image file and thus ignore the embedded
versions.
Change-Id: I22fb581abf56072e35e6c29d72e553747ec1a96a
Diffstat (limited to 'apps/shortcuts.c')
-rw-r--r-- | apps/shortcuts.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/shortcuts.c b/apps/shortcuts.c index b0a949933c..9f042a926a 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c | |||
@@ -47,7 +47,9 @@ | |||
47 | #include "screens.h" | 47 | #include "screens.h" |
48 | #include "talk.h" | 48 | #include "talk.h" |
49 | #include "yesno.h" | 49 | #include "yesno.h" |
50 | 50 | #ifdef HAVE_ALBUMART | |
51 | #include "playback.h" | ||
52 | #endif | ||
51 | 53 | ||
52 | #define MAX_SHORTCUT_NAME 32 | 54 | #define MAX_SHORTCUT_NAME 32 |
53 | #define SHORTCUTS_FILENAME ROCKBOX_DIR "/shortcuts.txt" | 55 | #define SHORTCUTS_FILENAME ROCKBOX_DIR "/shortcuts.txt" |
@@ -661,9 +663,16 @@ int do_shortcut_menu(void *ignored) | |||
661 | case SHORTCUT_SETTING: | 663 | case SHORTCUT_SETTING: |
662 | { | 664 | { |
663 | int old_sleeptimer_duration = global_settings.sleeptimer_duration; | 665 | int old_sleeptimer_duration = global_settings.sleeptimer_duration; |
666 | #ifdef HAVE_ALBUMART | ||
667 | int old_album_art = global_settings.album_art; | ||
668 | #endif | ||
664 | do_setting_screen(sc->u.setting, | 669 | do_setting_screen(sc->u.setting, |
665 | sc->name[0] ? sc->name : P2STR(ID2P(sc->u.setting->lang_id)),NULL); | 670 | sc->name[0] ? sc->name : P2STR(ID2P(sc->u.setting->lang_id)),NULL); |
666 | 671 | ||
672 | #ifdef HAVE_ALBUMART | ||
673 | if (old_album_art != global_settings.album_art) | ||
674 | set_albumart_mode(global_settings.album_art); | ||
675 | #endif | ||
667 | if (old_sleeptimer_duration != global_settings.sleeptimer_duration && | 676 | if (old_sleeptimer_duration != global_settings.sleeptimer_duration && |
668 | get_sleep_timer()) | 677 | get_sleep_timer()) |
669 | set_sleeptimer_duration(global_settings.sleeptimer_duration); | 678 | set_sleeptimer_duration(global_settings.sleeptimer_duration); |