Files
romm/backend/models
Claude f3ca7b0869 fix(steam): prefer a rom with a file, and guard a second sync press
Two findings from Copilot's review of the combined test branch.

`get_rom_ids_by_steam_app_id` ordered by `storefront IS NOT NULL`, which
only sorts store-only roms last. A physical or missing copy also has no
file and a lower id won over a downloadable one, against the docstring.
A new `rom_has_file_on_disk()` gives `Rom.has_file_on_disk` its SQL twin,
beside the `never_has_file` and `rom_without_file()` pair, and the query
orders by it.

`SteamLibrarySection.sync()` set its busy flag without checking it first,
and `RBtn`'s `loading` only changes how the button looks, so a second
press queued another sync and the first reply cleared the flag under the
second. It now returns early while a sync is in flight, as `link()` does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NH5s4gb7QNE7xa4pRUsBzx
2026-11-03 21:17:02 +00:00
..
2026-07-23 14:44:56 -04:00
2026-03-14 23:35:04 -04:00