SteamGridDB / steam-rom-manager

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

Fuzzy Title gives final name of "Star Wars Galaxies Trading Card Game: Champions of the Force" for the file "Aladdin (USA).sfc" #82

Closed thorvindr closed 6 years ago

thorvindr commented 6 years ago

Not sure what that's latching onto to name it that.

FrogTheFrog commented 6 years ago

@thorvindr My guess is incorrect glob. It should be ${title}.sfc instead of ${title}.

thorvindr commented 6 years ago

Yeah, I finally came around to using the simple glob ${title}.sf* , accompanied by the code that is supposed to remove all bracketed text in the filename from the title. In reality, it only removes one instance of parenthetical text and does nothing with brackets. So I no longer have fuzzy falsely-identifying games but I do have several titles a mile long.

thorvindr commented 6 years ago

Also had to disable fuzzy everything to stop getting false identities.

FrogTheFrog commented 6 years ago

@thorvindr Could you provide me with a list of all titles (or filenames)? I'm working on next SRM version and I'm rewriting everything. I could use them as test cases.

FrogTheFrog commented 6 years ago

Closing due to inactivity.

thorvindr commented 6 years ago

Ach. Sorry I didn't get back sooner. Yes, I can give you some filenames. The most ridiculous one is the one in the title. The file "aladdin (USA).sfc" was named "Star Wars Galaxies Trading Card Game: Champions of the Force." I also have "frogger.sfc" being identified as "Frogger Beyond."

FrogTheFrog commented 6 years ago

This is very strange :/ I can't replicate this. Could you copy-paste configuration? There's a button for that on the bottom right.

thorvindr commented 6 years ago

I can't give you that immediately because I'm not using that configuration anymore. It was the default config. I changed nothing and just told it to generate a list. Hang on; I'll see if I can make it do it again.

thorvindr commented 6 years ago

Alight I've got it doing it again. Not only will I copy my config but I'll give you a screenshot of my parser test as well. Standby.

thorvindr commented 6 years ago

screen2-24-18-11-03 Working on getting you the config. I'm running the app in a sandbox container so it can't screw up my steam library but that also means the app can't access the clipboard. Working it out.

FrogTheFrog commented 6 years ago

@thorvindr what glob are you using?

thorvindr commented 6 years ago

I will verify that this behavior is happening when the "User's glob" field is filled with "${title}" (which is the default entry).

When I change it to "${title}.sf*, it identifies that first file as "Aladdin." But it still leaves bracketed and parenthetical text in the titles (see the Donkey Kong title near the bottom).

I can at least give a screenshot of what seems to be the relevant part of the config screen.

screen2-24-18-11-13

thorvindr commented 6 years ago

So yeah. Issue as listed definitely solved by better glob. Still seems weird behavior to return a title that's so unrelated to the filename. Sincerely sorry if this has been a waste of your time.

FrogTheFrog commented 6 years ago

Donkey kong has smc ending whereas other games have sfc.

As for unrelated titles, it's due to fuzzy matcher failing to find game in the steamgriddb list. I can't really fix it as it is technically correct, because the algorithm says so.

thorvindr commented 6 years ago

Changed the glob to ${title}.s* and here are the results: screen2-24-18-11-30

The title modifier code that's supposed to remove "all brackets" actually removes no brackets but removes the first instance of parentheses.

FrogTheFrog commented 6 years ago

For title modifier I recommend trying ${fuzzyTitle} (it seems to be working right now). However, if you want to preserve your titles, use ${title}.

Now, to remove (...) and [...] from final title (either because fuzzy matcher did not or you are using anything else, but ${fuzzyTitle}), use /\s?\(.*?\)|\s?\[.*?\]/g regular expression in title modifier. It will match extra space (\s?) if it exist and either (...) and/or [...]. g flag allows to match multiple times.

thorvindr commented 6 years ago

okay thanks. I'll give that a try.