SteamGridDB / steam-rom-manager

An app for managing ROMs in Steam
GNU General Public License v3.0
1.85k stars 119 forks source link

SRM matches fuzzy titles correctly but regards them as false matches #333

Closed ryz closed 2 years ago

ryz commented 2 years ago

Hello,

for multiple games, SRM seems to match a title correctly, but doesn't regard them as matches in the fuzzyCache.json file.

It's unclear to me why this happens and how to change this behavior, especially as editing the JSON file will result in duplicate entries the next time the app list is generated.

Examples

    "{\"0\":[\"Psyvariar_Complete_Edition_(PS2)_(Europe)\",{\"use\":true,\"replaceDiacritics\":true,\"removeCharacters\":true,\"removeBrackets\":true}]}": {
        "output": "Psyvariar Complete Edition",
        "matched": false
    },
    "{\"0\":[\"Ratchet_And_Clank_(PS2)_(USA)\",{\"use\":true,\"replaceDiacritics\":true,\"removeCharacters\":true,\"removeBrackets\":true}]}": {
        "output": "Ratchet And Clank",
        "matched": false
    },
    "{\"0\":[\"Resident_Evil_Biohazard_Outbreak_(PS2)_(Japan)_(English_Patched_v2.1)\",{\"use\":true,\"replaceDiacritics\":true,\"removeCharacters\":true,\"removeBrackets\":true}]}": {
        "output": "Resident Evil Biohazard Outbreak",
        "matched": false
    },
    "{\"0\":[\"Resident_Evil_Biohazard_Outbreak_File_2_(PS2)_(Japan)_(English_Patched_v2.1)\",{\"use\":true,\"replaceDiacritics\":true,\"removeCharacters\":true,\"removeBrackets\":true}]}": {
        "output": "Resident Evil Biohazard Outbreak File 2",
        "matched": false
cbartondock commented 2 years ago

Weird. Fuzzy cache code is very very old, I'll take a look.

cbartondock commented 2 years ago

So I looked into this. Those titles are indeed not being matched, but because you have aggressive fuzzy matching enabled and remove () [] enabled it replaces all underscores with spaces and removes anything in brackets before checking against the list. It isn't finding them in the fuzzy list, even though it happens to have the title exactly correct once it does its modifications. The solution is to add these titles to the list of fuzzy titles.

Actually one of them, Ratchet And Clank, is in the fuzzy list. But it's "Ratchet & Clank" not "Ratchet And Clank" and the fuzzy matcher we use https://www.npmjs.com/package/fuzzaldrin-plus isn't clever enough to realize these are the same thing.

cbartondock commented 2 years ago

Closing as I don't think SRM can easily work around the &=and issue with fuzzaldrin-plus, and as for the other titles the solution is to request that they be added to steamgriddb.