[UI/UX] Have matches for games prioritize metadata with fully matching titles
At the moment, if you have two games, say:
Over the Hedge and Over the Hedge: Hammy Goes Nuts
And have Romm search for them, it will identify both games as being Hammy Goes Nuts. In almost every case, it'll metadata match with whatever IGDB presents first, even if there's an entry that perfectly matches the game with the shorter title. This creates a lot of incorrect duplicate entries, because games with spinoffs or sequels will often have their first entry incorrectly identified as being one of the sequels.
It would be really good to have the metadata search prioritize game metadata with game titles that match 100% perfectly over the first returned result.
This is weird, because we have code that checks for exact matches by name, slug or normalized name (due to IGDB weirdness):
def is_exact_match(rom: dict, search_term: str) -> bool:
return (
rom["name"].lower() == search_term.lower()
or rom["slug"].lower() == search_term.lower()
or (
self._normalize_exact_match(rom["name"])
== self._normalize_exact_match(search_term)
)
)
Huh, that’s super odd. It definitely doesn’t do it. If you have, for example, any game that has a sequel with a 2 at the end, both the original game and the sequel will be matched to the sequel.
Castlevania Castlevania 2
will become just two versions of Castlevania 2 after IGDB matching.
@Casuallynoted I just tested both of these examples with the following results:
[NES]
· Castlevania.zip
Identified as Castlevania 👾
· Castlevania II.zip
Identified as Castlevania II: Simon's Quest 👾
As for "Over the Hedge", this seems like an IGDB issue, since it's only returning a single result for that query on Nintendo DS for the sequel.