diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 42849e3fb9..3f5fb78b22 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c @@ -39,9 +39,6 @@ #include "option_select.h" #include "debug.h" #include "shortcuts.h" -#ifdef HAVE_ALBUMART -#include "playback.h" -#endif #include "appevents.h" /* 1 top, 1 bottom, 2 on either side, 1 for the icons @@ -438,9 +435,6 @@ static int gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter int quick_screen_quick(int button_enter) { struct gui_quickscreen qs; -#ifdef HAVE_ALBUMART - int old_album_art = global_settings.album_art; -#endif bool usb = false; for (int i = 0; i < 4; ++i) @@ -453,13 +447,7 @@ int quick_screen_quick(int button_enter) int ret = gui_syncquickscreen_run(&qs, button_enter, &usb); if (ret & QUICKSCREEN_CHANGED) - { settings_save(); -#ifdef HAVE_ALBUMART - if (old_album_art != global_settings.album_art) - set_albumart_mode(global_settings.album_art); -#endif - } if (usb) return QUICKSCREEN_IN_USB; return ret & QUICKSCREEN_GOTO_SHORTCUTS_MENU ? QUICKSCREEN_GOTO_SHORTCUTS_MENU : diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c index 052eb68bc3..b71a286240 100644 --- a/apps/menus/playback_menu.c +++ b/apps/menus/playback_menu.c @@ -177,26 +177,7 @@ MENUITEM_SETTING(pause_rewind, &global_settings.pause_rewind, NULL); MENUITEM_SETTING(play_frequency, &global_settings.play_frequency, NULL); #endif #ifdef HAVE_ALBUMART -static int albumart_callback(int action, - const struct menu_item_ex *this_item, - struct gui_synclist *this_list) -{ - (void)this_item; - (void)this_list; - static int initial_aa_setting; - switch (action) - { - case ACTION_ENTER_MENUITEM: - initial_aa_setting = global_settings.album_art; - break; - case ACTION_EXIT_MENUITEM: /* on exit */ - if (initial_aa_setting != global_settings.album_art) - set_albumart_mode(global_settings.album_art); - } - return action; -} -MENUITEM_SETTING(album_art, &global_settings.album_art, - albumart_callback); +MENUITEM_SETTING(album_art, &global_settings.album_art, NULL); #endif MENUITEM_SETTING(playback_log, &global_settings.playback_log, NULL); diff --git a/apps/settings_list.c b/apps/settings_list.c index db73f28035..90b44549f2 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -656,6 +656,13 @@ static void playback_frequency_callback(int sample_rate_hz) } #endif /* HAVE_PLAY_FREQ */ +#ifdef HAVE_ALBUMART +static void albumart_callback(int mode) +{ + set_albumart_mode(mode); +} +#endif + /* perform shuffle/unshuffle of the current playlist based on the boolean provided */ static void shuffle_playlist_callback(bool shuffle) { @@ -1032,12 +1039,12 @@ const struct settings_list settings[] = { #endif /* HAVE_PLAY_FREQ */ #ifdef HAVE_ALBUMART - CHOICE_SETTING(0, album_art, LANG_ALBUM_ART, 1, - "album art", "off,prefer embedded,prefer image file", - NULL, 3, - ID2P(LANG_OFF), - ID2P(LANG_PREFER_EMBEDDED), - ID2P(LANG_PREFER_IMAGE_FILE)), + CHOICE_SETTING(F_CB_ON_SELECT_ONLY|F_CB_ONLY_IF_CHANGED, album_art, + LANG_ALBUM_ART, 1, "album art", + "off,prefer embedded,prefer image file", + albumart_callback, 3, + ID2P(LANG_OFF), ID2P(LANG_PREFER_EMBEDDED), + ID2P(LANG_PREFER_IMAGE_FILE)), #endif /* LCD */ diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 29342142b5..36c39b586f 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c @@ -47,9 +47,6 @@ #include "screens.h" #include "talk.h" #include "yesno.h" -#ifdef HAVE_ALBUMART -#include "playback.h" -#endif #define MAX_SHORTCUT_NAME 64 #define SHORTCUTS_HDR "[shortcut]"