mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
Physical games encoded file-lessness as is_physical=True with
missing_from_fs=False, while every consumer asked the same question through
missing_from_fs alone. Each of those consumers was therefore wrong for a
physical game, and each would have needed its own is_physical rider.
Add Rom.has_file_on_disk, covering both reasons a rom has no file, expose it
on RomSchema, and route the file-dependent surfaces through it:
- The ES-DE and Pegasus exporters no longer emit entries whose path points at
the .physical sentinel folder.
- The device feeds gain a single _servable_roms() seam, so all three entry
points that enumerate roms drop the ones with no file rather than minting
download URLs for them.
- GET /roms/{id}/content answers 404 with a reason instead of falling through
to the generic "no files found".
- v2 gates Play, Download, copy-link and the QR share on the flag, in
useCanPlay and useGameActions rather than at each of the surfaces.
The is_physical exclusions in mark_missing_roms stay: they are what maintains
the invariant that a physical game is never flagged missing, and the one in
the missing filter keeps a stray flag away from the cleanup task that
hard-deletes.
Also translate the physical-game and barcode strings, which had been copied
into eleven locales as English.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>