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

View file

@ -1,7 +1,7 @@
{ {
"plugin.id": "itch-artprovider", "plugin.id": "itch-artprovider",
"plugin.name": "itch.io Art Provider", "plugin.name": "itch.io Art Provider",
"plugin.version": "0.1.10", "plugin.version": "0.1.11",
"plugin.min-api-version": "1.1.0", "plugin.min-api-version": "1.1.0",
"plugin.link": "https://forge.thergic.ar/jose/itchio-opengamepadui-artprovider-plugin", "plugin.link": "https://forge.thergic.ar/jose/itchio-opengamepadui-artprovider-plugin",
"plugin.source": "https://forge.thergic.ar/jose/itchio-opengamepadui-artprovider-plugin", "plugin.source": "https://forge.thergic.ar/jose/itchio-opengamepadui-artprovider-plugin",