mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
The genre/franchise/company/publisher/developer/collection/age-rating/ player-count filters read from `roms_metadata`, but the join was added at the end of `filter_roms`, after the "Group ROMs" block had already derived its dedup window from the query. The window therefore filtered on a table it never joined: the database cross-joined `roms` against `roms_metadata` (a view over `roms`), which SQLAlchemy reports as a cartesian product. Besides the cost, the window then ranked every ROM in the library rather than the matching ones, so a game whose matching version was not the group's primary one disappeared from the gallery entirely. Fixes #4389 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>