Files
romm/backend/handler
Sam Dornan 164c2e39d8 fix(hltb): retry a separated title with the separator dropped (#4759)
* fix(hltb): retry a separated title with the separator dropped

get_rom rewrites " - " as ": " before searching, but HowLongToBeat
returns nothing for "pokemon: emerald version" (or the dashed form),
while "pokemon emerald version" finds "Pokémon Emerald Version". The
tail-only retry ("emerald version") scores under the 0.85 gate, so the
ROM went unmatched.

_search_and_match now retries "<head> <tail>" before the looser
tail-only search. The split is still on the colon only, so in-word
hyphens ("spider-man 2") trigger no retries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(hltb): trim the search docstring and type the test fakes

Addresses review: the docstring is one sentence, and the search_games
fakes carry the parameter and return annotations the real method has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 14:08:22 -05:00
..
2025-12-07 12:19:13 -05:00