Files
romm/backend/handler/database
Sam Dornan 3a1ada011b Sort and filter the library by game length
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
2026-09-09 22:44:02 +00:00
..
2025-09-04 11:17:00 -03:00
2026-03-12 23:02:12 -04:00
2026-04-06 22:29:55 -04:00