summaryrefslogtreecommitdiff
path: root/apps/menus/playback_menu.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-11-19 05:11:13 +0100
committerWilliam Wilgus <me.theuser@yahoo.com>2022-01-22 08:29:40 -0500
commitbc5a6385949c9f0a17173f3512aa9a6db9175803 (patch)
treeb7b2990a4a43d6027f19cbe32a22cd2f0774d0b1 /apps/menus/playback_menu.c
parentaafe2dd2d14e1ce88b5c9c819277ca0bc98af6e5 (diff)
downloadrockbox-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/menus/playback_menu.c')
-rw-r--r--apps/menus/playback_menu.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c
index 5f9479fae3..fe319d6027 100644
--- a/apps/menus/playback_menu.c
+++ b/apps/menus/playback_menu.c
@@ -201,6 +201,28 @@ MENUITEM_SETTING(pause_rewind, &global_settings.pause_rewind, NULL);
201MENUITEM_SETTING(play_frequency, &global_settings.play_frequency, 201MENUITEM_SETTING(play_frequency, &global_settings.play_frequency,
202 playback_callback); 202 playback_callback);
203#endif 203#endif
204#ifdef HAVE_ALBUMART
205static int albumart_callback(int action,
206 const struct menu_item_ex *this_item,
207 struct gui_synclist *this_list)
208{
209 (void)this_item;
210 (void)this_list;
211 static int initial_aa_setting;
212 switch (action)
213 {
214 case ACTION_ENTER_MENUITEM:
215 initial_aa_setting = global_settings.album_art;
216 break;
217 case ACTION_EXIT_MENUITEM: /* on exit */
218 if (initial_aa_setting != global_settings.album_art)
219 set_albumart_mode(global_settings.album_art);
220 }
221 return action;
222}
223MENUITEM_SETTING(album_art, &global_settings.album_art,
224 albumart_callback);
225#endif
204 226
205MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0, 227MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
206 Icon_Playback_menu, 228 Icon_Playback_menu,
@@ -231,6 +253,9 @@ MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
231#ifdef HAVE_PLAY_FREQ 253#ifdef HAVE_PLAY_FREQ
232 ,&play_frequency 254 ,&play_frequency
233#endif 255#endif
256#ifdef HAVE_ALBUMART
257 ,&album_art
258#endif
234 ); 259 );
235 260
236static int playback_callback(int action, 261static int playback_callback(int action,