Commit graph

21 commits

Author SHA1 Message Date
75a6244fd4 bump to v0.1.14
All checks were successful
Build plugin / build (push) Successful in 1m8s
2026-08-19 22:13:24 -03:00
2ed80ec8a1 fix: critical bugs from code review
All checks were successful
Build plugin / build (push) Successful in 1m6s
- Split get_boxart() into _enrich_metadata + _fetch_banner_textures (under 50 lines)
- Fix race condition: add _pending_gif_requests to prevent concurrent downloads
- Fix race condition: add is_instance_valid checks in _on_focus_changed
- Fix stale reference: check is_instance_valid on _focused_animated_texture
- Fix temp file collisions: use URL hash for unique temp file names
- Add timeout to HTTPRequest in _download_url_bytes (HTTP_TIMEOUT_MS was unused)
- Add bounds checks in _parse_gif_extension and _skip_gif_header for truncated GIFs
2026-08-19 21:31:57 -03:00
a54c90f7c0 refactor: simplify _fetch_game_page_metadata using shared helpers
All checks were successful
Build plugin / build (push) Successful in 1m5s
- Replace manual HTTP polling with _download_url_bytes
- Extract _is_cloudflare_challenge and _extract_screenshots_from_html
- All functions now under 50 lines
2026-08-19 21:19:33 -03:00
3f5c45a99d refactor: split long functions and fix AGENTS.md violations
All checks were successful
Build plugin / build (push) Successful in 1m8s
- Rename goos/goarch to os_name/arch_name (no domain jargon)
- Split _install_ffmpeg into _detect_os, _detect_arch, _build_ffmpeg_url, _download_url_bytes, _extract_ffmpeg
- Split _build_animated_gif_texture into _extract_gif_frames and _assemble_animated_texture
- Split _parse_gif_frame_delays into _skip_gif_header, _parse_gif_extension, _skip_gif_image_descriptor
- Replace _download_gif_bytes with _download_url_bytes (shared helper)
- All functions now under 50 lines
2026-08-19 21:17:00 -03:00
208dc58f28 feat: animated GIF covers with config toggle and focus-based pausing
All checks were successful
Build plugin / build (push) Successful in 1m8s
- Add settings menu with 'Animate GIF covers' toggle (default: off)
- When enabled: extract all GIF frames via ffmpeg, build AnimatedTexture
- When disabled: extract first frame only (static ImageTexture)
- AnimatedTexture starts paused — unpauses only when card has focus
- Focus-based pausing via gui_focus_changed signal (walks up to GameCard)
- Parse GIF89a frame delays for accurate animation speed
- Cache invalidation when setting changes (no restart needed)
- Cache AnimatedTextures in memory to avoid re-extraction
- Bump to v0.1.13
2026-08-19 21:11:04 -03:00
9be6847f14 feat: add ffmpeg-based GIF first-frame extraction and remove GIF filtering
All checks were successful
Build plugin / build (push) Successful in 1m8s
- Add ffmpeg download and installation (mirrors butler pattern)
- Add _fetch_gif_first_frame() that downloads GIF and extracts first frame
- Add _ensure_ffmpeg() that checks system PATH, bundled location, or downloads
- Add _fetch_image() that routes GIF URLs through ffmpeg, non-GIF through HTTPImageFetcher
- Remove GIF filtering from screenshots and cover URLs
- Simplify _url_for_layout since _fetch_image handles GIFs transparently
- Bump to v0.1.12
2026-08-19 20:48:59 -03:00
b9646e6a8c 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.
2026-08-19 18:58:10 -03:00
98053e6ea7 fix: don't fall back to screenshots as capsule art
All checks were successful
Build plugin / build (push) Successful in 1m10s
_best_portrait_url was falling back to non-GIF screenshots when both
coverUrl and stillCoverUrl were GIFs. Screenshots are not capsule art,
so this produced wrong imagery. Now the function only returns cover
URLs and returns empty when only GIFs are available.
2026-08-19 18:49:29 -03:00
658e8552cb Stop returning GIF URLs from _best_portrait_url
All checks were successful
Build plugin / build (push) Successful in 1m11s
When all available cover URLs are GIFs (coverUrl, stillCoverUrl, and
screenshots), return empty instead of a GIF URL. HTTPImageFetcher cannot
decode GIFs, so attempting to fetch one always returns null. Returning
empty early avoids unnecessary network requests and confusing log noise.
2026-08-19 18:29:34 -03:00
696123b55a Bump to v0.1.8 for clean rebuild
All checks were successful
Build plugin / build (push) Successful in 1m8s
2026-08-19 18:22:08 -03:00
1bde072983 Fix srcset-polluted URLs from butlerd, sanitize cover and screenshot URLs
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.
2026-08-19 18:08:35 -03:00
730b600ec0 Resolve merge conflict: cache failures, add Cloudflare detection, bump to v0.1.6
All checks were successful
Build plugin / build (push) Successful in 1m6s
2026-08-19 17:32:25 -03:00
d842605098 Bump version to v0.1.5
All checks were successful
Build plugin / build (push) Successful in 1m7s
2026-08-19 16:42:25 -03:00
e3281f7587 readability: rename constants, extract poll intervals, remove dead code
- BOXART_DIR, META_CACHE_FILE, _meta_cache_dir, _enriched_meta
- _find_game_dict, _combine_side_by_side(left, right)
- CONNECT_POLL_DELAY_MS, READ_POLL_DELAY_MS, LOG_URL_MAX_LEN
- Remove dead _cover_url function
- Fix fall-through comment, boxart_provider variable name
2026-08-19 16:41:33 -03:00
75f0463bc6 readability: extract magic constants
- HTTP_TIMEOUT_MS for HTTP connection/request timeout
- SCREENSHOT_REGEX_PATTERN for itch.io screenshot URL regex
2026-08-19 16:20:21 -03:00
d06cba872c GIF handling: skip GIFs in HTTPImageFetcher, filter GIF screenshots, fallback portrait URLs
All checks were successful
Build plugin / build (push) Successful in 1m11s
- HTTPImageFetcher: skip GIF requests early (Godot can't decode), add webp support, try fallback formats
- Art provider: filter GIF screenshots from banners, prefer non-GIF cover URLs via _best_portrait_url
- Fix variable ordering bug (meta used before definition)
2026-08-17 11:07:54 -03:00
8a5dc41064 Add comprehensive logging to art provider for diagnosing missing art
All checks were successful
Build plugin / build (push) Successful in 1m11s
2026-08-17 10:55:56 -03:00
a4834a39eb Bump version to v0.1.2
All checks were successful
Build plugin / build (push) Successful in 1m9s
2026-08-17 01:53:02 -03:00
4efe3a9110 Combine two screenshots side-by-side for banner layout
All checks were successful
Build plugin / build (push) Successful in 1m8s
2026-08-17 01:51:54 -03:00
8e0e5bfedf Skip GIF screenshots to avoid ungrabbable animated images
Some checks failed
Build plugin / build (push) Has been cancelled
2026-08-17 01:50:21 -03:00
cb26d9931c Initial commit: itch.io box art provider for OpenGamepadUI
All checks were successful
Build plugin / build (push) Successful in 1m10s
2026-08-16 20:17:35 -03:00