mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
HowLongToBeat times were only readable one game at a time, on a game's detail page. This makes main-story length a property of the library: * `generated_hltb_main_story` (migration 0128) is a STORED generated column over `hltb_metadata`, indexed, so the sort walks an index and the range filter composes into SQL. * `GET /roms` takes `hltb_main_story_min` / `hltb_main_story_max` in seconds, either side optional, and `order_by=hltb_main_story`. * The v2 gallery gets a sortable Length column in list mode and a game-length range (in hours) in the filter drawer, both surviving a bookmark via `?lengthMin` / `?lengthMax` and savable as a smart collection. A rom HowLongToBeat has no time for derives NULL, so either comparison drops it; the drawer says so rather than letting it read as a bug. Closes #4232 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KAn4d3drsdnEKeVuvkMNpU