Do not try to fetch full name thumbnails if not set explicitly. (#16174)

This commit is contained in:
zoltanvb 2024-01-29 17:42:39 +01:00 committed by GitHub
parent 25317c3a1d
commit 996eb680b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -292,6 +292,7 @@ void gfx_thumbnail_request(
const char *system = NULL;
const char *img_name = NULL;
static char last_img_name[PATH_MAX_LENGTH] = {0};
settings_t *settings = config_get_ptr();
enum playlist_thumbnail_name_flags curr_flag;
if (!playlist)
goto end;
@ -326,6 +327,11 @@ void gfx_thumbnail_request(
curr_flag = playlist_get_curr_thumbnail_name_flag(playlist,idx);
if (curr_flag & PLAYLIST_THUMBNAIL_FLAG_NONE || curr_flag & PLAYLIST_THUMBNAIL_FLAG_SHORT_NAME)
goto end;
/* Do not try to fetch full names here, if it is not explicitly wanted */
if (!settings->bools.playlist_use_filename &&
!playlist_thumbnail_match_with_filename(playlist) &&
curr_flag == PLAYLIST_THUMBNAIL_FLAG_INVALID)
playlist_update_thumbnail_name_flag(playlist, idx, PLAYLIST_THUMBNAIL_FLAG_FULL_NAME);
/* Trigger thumbnail download *
* Note: download will grab all 3 possible thumbnails, no matter