mirror of
https://github.com/rommapp/romm.git
synced 2026-07-01 08:16:21 +00:00
Adds a "Metadata provider" gallery filter so a library can be narrowed by which providers each ROM matched (IGDB, MobyGames, ScreenScraper, etc.), mirroring the existing multi-value filters (player count, age rating). Backend: - New `_filter_by_metadata_providers` keyed off each provider's id column on Rom, with any/all/none logic; wired through filter_roms, get_roms_scalar, the /roms endpoint, and the unscoped cache gate. - Smart collections apply the criterion via get_smart_collection_roms. - Unknown provider slugs are ignored (no-op) so stale bookmarks or hand-edited URLs don't error. Frontend (v1 + v2): - Shared METADATA_PROVIDER_OPTIONS registry; provider list is a fixed set rather than data-derived, so options are static. - Wired into the galleryFilter store, rom API service, request cache key, both filter drawers, v2 URL persistence, the v2 refetch watcher, and smart-collection serialization/summary. - Added the `platform.metadata-provider` key to all locales. Tests: - Backend handler, endpoint, and smart-collection coverage (any/all/none plus unknown-slug). - Frontend smartCollectionCriteria serialization/summary coverage. Also normalized collections_handler.py to LF (it was the only CRLF file in the backend, which tripped git-diff-check on the edited lines). AI assistance: implemented with Claude Code (Anthropic). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>