diff --git a/core/boxart_itch.gd b/core/boxart_itch.gd index 78648e1..0a6e9a0 100644 --- a/core/boxart_itch.gd +++ b/core/boxart_itch.gd @@ -186,25 +186,17 @@ func _url_for_layout(kind: LAYOUT, cover_url: String, screenshots: Array) -> Str return "" -## Returns a non-GIF URL suitable for portrait/logo from the game data. -## Falls back through: stillCoverUrl → coverUrl (non-GIF) → first non-GIF -## screenshot. Returns empty if only GIFs are available, since -## HTTPImageFetcher cannot decode GIF images. -func _best_portrait_url(game: Dictionary, screenshots: Array) -> String: - # Prefer stillCoverUrl if it's not a GIF +## 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. +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): return still - # Try coverUrl if it's not a GIF var cover: String = game.get("coverUrl", "") if not cover.is_empty() and not _is_gif_url(cover): return cover - # Try the first non-GIF screenshot - for url in screenshots: - if not _is_gif_url(url): - return url - # All available URLs are GIFs — return empty so the caller gets null - # instead of attempting a doomed fetch. return "" diff --git a/plugin.json b/plugin.json index 25b9074..634e65f 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "plugin.id": "itch-artprovider", "plugin.name": "itch.io Art Provider", - "plugin.version": "0.1.9", + "plugin.version": "0.1.10", "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",