fix: always prefer stillCoverUrl for capsule art
All checks were successful
Build plugin / build (push) Successful in 1m10s

_bset_portrait_url was filtering GIF URLs, but stillCoverUrl is the
still image version by definition and should always be used when
available. This restores the original behavior where games with GIF
capsules get their still cover image.
This commit is contained in:
Jose Falanga 2026-08-19 18:58:10 -03:00
parent 98053e6ea7
commit b9646e6a8c
2 changed files with 5 additions and 9 deletions

View file

@ -187,17 +187,13 @@ func _url_for_layout(kind: LAYOUT, cover_url: String, screenshots: Array) -> Str
## Returns the best portrait/logo URL from the game data.
## Prefers stillCoverUrl, then coverUrl. Screenshots are never used as
## capsule art. Returns empty if the only available cover URLs are GIFs,
## since HTTPImageFetcher cannot decode GIF images.
## Prefers stillCoverUrl (the still/non-animated version of the cover),
## then coverUrl. Screenshots are never used as capsule art.
func _best_portrait_url(game: Dictionary, _screenshots: Array) -> String:
var still: String = game.get("stillCoverUrl", "")
if not still.is_empty() and not _is_gif_url(still):
if not still.is_empty():
return still
var cover: String = game.get("coverUrl", "")
if not cover.is_empty() and not _is_gif_url(cover):
return cover
return ""
return game.get("coverUrl", "")
## Combines two textures side-by-side into a single banner image.