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
This commit is contained in:
Christian Soffke 2021-11-19 05:11:13 +01:00 committed by William Wilgus
parent aafe2dd2d1
commit bc5a638594
11 changed files with 153 additions and 6 deletions

View file

@ -39,6 +39,9 @@
#include "option_select.h"
#include "debug.h"
#include "shortcuts.h"
#ifdef HAVE_ALBUMART
#include "playback.h"
#endif
/* 1 top, 1 bottom, 2 on either side, 1 for the icons
* if enough space, top and bottom have 2 lines */
@ -411,6 +414,9 @@ int quick_screen_quick(int button_enter)
struct gui_quickscreen qs;
bool oldshuffle = global_settings.playlist_shuffle;
int oldrepeat = global_settings.repeat_mode;
#ifdef HAVE_ALBUMART
int old_album_art = global_settings.album_art;
#endif
bool usb = false;
if (global_settings.shortcuts_replaces_qs)
@ -446,6 +452,10 @@ int quick_screen_quick(int button_enter)
else
playlist_sort(NULL, true);
}
#ifdef HAVE_ALBUMART
if (old_album_art != global_settings.album_art)
set_albumart_mode(global_settings.album_art);
#endif
}
return (usb ? 1:0);
}