Skip to content

Commit 996eb68

Browse files
authored
Do not try to fetch full name thumbnails if not set explicitly. (#16174)
1 parent 25317c3 commit 996eb68

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

gfx/gfx_thumbnail.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ void gfx_thumbnail_request(
292292
const char *system = NULL;
293293
const char *img_name = NULL;
294294
static char last_img_name[PATH_MAX_LENGTH] = {0};
295+
settings_t *settings = config_get_ptr();
295296
enum playlist_thumbnail_name_flags curr_flag;
296297
if (!playlist)
297298
goto end;
@@ -326,6 +327,11 @@ void gfx_thumbnail_request(
326327
curr_flag = playlist_get_curr_thumbnail_name_flag(playlist,idx);
327328
if (curr_flag & PLAYLIST_THUMBNAIL_FLAG_NONE || curr_flag & PLAYLIST_THUMBNAIL_FLAG_SHORT_NAME)
328329
goto end;
330+
/* Do not try to fetch full names here, if it is not explicitly wanted */
331+
if (!settings->bools.playlist_use_filename &&
332+
!playlist_thumbnail_match_with_filename(playlist) &&
333+
curr_flag == PLAYLIST_THUMBNAIL_FLAG_INVALID)
334+
playlist_update_thumbnail_name_flag(playlist, idx, PLAYLIST_THUMBNAIL_FLAG_FULL_NAME);
329335

330336
/* Trigger thumbnail download *
331337
* Note: download will grab all 3 possible thumbnails, no matter

0 commit comments

Comments
 (0)