|
All checks were successful
Build plugin / build (push) Successful in 1m13s
butlerd sometimes passes itch.io coverUrl/stillCoverUrl with trailing
srcset descriptors (e.g. ' 1x, h' or ' 1'). These polluted URLs cause
HTTPImageFetcher to fail because the URL is invalid and the extension
extraction breaks.
Changes:
- Add _sanitize_url() to strip srcset artifacts from URLs
- Add _is_gif_url() helper that works with both clean and polluted URLs
- Fix SCREENSHOT_REGEX_PATTERN to use [\w+/=]* instead of [^"]* to
avoid crossing srcset boundaries in HTML
- Replace all .ends_with('.gif') checks with _is_gif_url()
- Sanitize all URLs from game metadata and HTML scraping
- Add IMAGE_EXTS constant for extension validation
Also bump to v0.1.7.
|
||
|---|---|---|
| .forgejo/workflows | ||
| assets | ||
| core | ||
| .gitignore | ||
| export_presets.cfg | ||
| LICENSE | ||
| Makefile | ||
| plugin.gd | ||
| plugin.json | ||
| README.md | ||
OpenGamepadUI itch.io Art Provider
Box art provider for itch.io games in OpenGamepadUI.
Fetches cover art and screenshots from itch.io game pages. Works alongside the itch.io library plugin to provide per-layout artwork: the cover for portrait/logo, full-res screenshots for landscape/banner.
Enriches game metadata by scraping the itch.io page HTML for screenshots (the
itch.io API does not expose them), caches the result, and uses OGPU's
HTTPImageFetcher for async image downloads.
Requirements
See the OpenGamepadUI requirements.
Building
make help
make build
make install
How it works
The provider registers with OGPU's BoxArtManager as "itch". When a menu
requests artwork for a game, it checks the library item's launch items for one
with _provider_id == "itch" and reads the itch.io game dict from its metadata
(coverUrl, stillCoverUrl, url). It then:
- Looks up cached screenshots for the game (or scrapes the itch.io page).
- Picks the right URL for each layout:
- portrait / logo: cover image
- landscape: first screenshot (or cover if none)
- banner: second screenshot (or first, or cover)
- Fetches the image via
HTTPImageFetcher(with OGPU'sCachesystem).