0123 appends steam_metadata to the generated facet chains, but every test
seeded its library through igdb_metadata, so nothing held the wiring in
place: a Steam-only game reaching roms_facets, and the builder indexing it,
were both untested. Both assertions fail when the blob is written to a
provider the chains do not list.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The portrait-capsule HEAD request was the one Steam call living outside
SteamService, with its own session, user-agent and timeout. It moves in as
get_library_capsule_url, following LibretroThumbnailsService.head, so the
handler just picks the capsule or falls back to the header image.
get_app_details grows a filters passthrough, and the heartbeat asks for
"basic" instead of pulling a whole store page to read one success flag.
Guard the facet mirror against a provider that reaches the model but not a
migration's trigger column list: test_every_provider_id_is_mirrored writes
every METADATA_SOURCE_COLUMNS id and asserts each roms_facets twin follows.
Verified against triggers rebuilt without steam_id, where it fails naming
the missing provider.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Metadata providers (ScreenScraper, RetroAchievements, LaunchBox,
Flashpoint, gamelist, IGDB) distinguish the publisher from the developer
of a game, but RomM amalgamated both into a single `companies` list at
ingestion, so the distinction was unrecoverable. This adds `publishers`
and `developers` as new, refined fields end to end while keeping
`companies` (the merged union) working exactly as before.
Backend:
- Handlers now emit publishers/developers alongside the unchanged
companies list; IGDB requests the involved_companies developer/
publisher flags to split by role.
- Migration 0112 adds generated_publishers/generated_developers columns
on roms, projects them through the roms_metadata view, mirrors them
into roms_facets, and adds publisher/developer virtual-collection
types (triggers/functions rebuilt for MariaDB/MySQL + PostgreSQL).
- Filters, facets, endpoints, smart collections and the gamelist/pegasus
exporters all carry the new fields; exporters prefer the explicit
split and fall back to the companies heuristic for un-rescanned ROMs.
Frontend (v2):
- Shared filter store + API service, gallery filter drawer, URL
persistence, game detail display (Developers/Publishers with a
Companies fallback), edit dialog, smart-collection criteria, and a
publisher/developer "group virtual collections by" option.
- Also relabels the confusing "company"->"Developer" group-by option
to "Company" now that a proper Developer option exists.
Fixes#3518
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Server Stats page ran two full scans of the multi-gigabyte `roms`
table on every visit: the metadata-coverage breakdown counted eleven
provider-id columns per platform, and the region breakdown pulled every
row's regions into Python. Both were returned in the same request as the
cheap summary counts, so the whole page stayed blank until they finished.
Mirror the provider match ids into the narrow `roms_facets` table
(migration 0102, kept in sync by the same triggers as the existing facet
columns) and read both breakdowns from it, so neither query touches
`roms`. Split the v2 Server Stats view into a summary-first request and a
separate breakdown request so the six top cards render immediately.
Fixes#3901
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Building the filter dropdowns aggregated the facet columns straight off
`roms`. Those columns are cheap to compute since #3826, but they sit inline
with the raw provider-metadata blobs, so the aggregation read every row of a
multi-gigabyte table: seconds of pure disk reading on any database whose
buffer pool is smaller than the table (the stock 128-256 MB defaults always
are on a large library).
`roms_facets` holds only the filter values and is kept in sync by AFTER
INSERT/UPDATE triggers on `roms`, so every write path stays consistent
without an application hook. Deletes ride the ON DELETE CASCADE foreign key.
Fixes#3882
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>