fix: always prefer stillCoverUrl for capsule art
All checks were successful
Build plugin / build (push) Successful in 1m10s
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:
parent
98053e6ea7
commit
b9646e6a8c
2 changed files with 5 additions and 9 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"plugin.id": "itch-artprovider",
|
||||
"plugin.name": "itch.io Art Provider",
|
||||
"plugin.version": "0.1.10",
|
||||
"plugin.version": "0.1.11",
|
||||
"plugin.min-api-version": "1.1.0",
|
||||
"plugin.link": "https://forge.thergic.ar/jose/itchio-opengamepadui-artprovider-plugin",
|
||||
"plugin.source": "https://forge.thergic.ar/jose/itchio-opengamepadui-artprovider-plugin",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue