Files
romm/frontend
Georges-Antoine Assi c2547ec68c fix: model "no file on disk" once instead of per call site
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>
2026-08-25 22:26:20 -04:00
..
2026-06-22 10:06:03 -04:00
2025-09-09 20:19:30 -04:00
2026-05-30 20:53:52 -04:00
2026-07-26 14:14:07 -04:00