mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
The detail response listed a ROM's smart collections by loading every own/public smart collection and scanning its cached rom_ids list in Python. rom_ids grows with library size, so this got heavier on large libraries on every detail load. Push containment + visibility into the query via the existing cross-DB json_array_contains_value helper (JSON_CONTAINS on MariaDB/MySQL, @>/? on Postgres), returning only the matching rows with id/name/is_public. The schema mapper no longer filters, so smart_for_user becomes the plain from_smart_collections mapping. Behavior is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>