(Menu) Thumbnail Fuzzi-matching Filenames
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
First and foremost consider this:
- Only RetroArch bugs should be filed here. Not core bugs or game bugs
- This is not a forum or a help section, this is strictly developer oriented
Description
This RFE comes from the realization that although there is often 'a' thumbnail of a game in the respective database for the playlist/game entry, often there isn't 'the' actual right name. Especially if you make your own names from using the manual scanner or use a unusual set. Thus it would be good if you could add a fuzzy way to search for thumbnails to download. This isn't actually that error prone because as was mentioned, 95% of the time there is 'a' thumbnail for the game, but not the exact name. And you can maximize the chances of a match by 1) using lower case in both strings to match, 2) removing useless 'metadata extras' like '()[],' - and replace '_' by space - from both strings 3) use one of the more sophisticated fuzzy methods like 'Token Set Ratio' and set a arbitrarily high match ratio, like 90% for success.
You can actually use the github api to get the filenames without altering libretro-database to add a field to 'has a thumbnail' if you either keep a md5 of the libretro-thumbnails subprojects master at the time of retroarch built or have git available. You just need the 'master' md5 of the subproject ( git ls-remote https://github.com/libretro-thumbnails/ScummVM refs/heads/master for ScummVM for instance)
then add it to the api like this to get a json of the 3 top dirs of the thumbnail scheme:
https://api.github.com/repos/libretro-thumbnails/ScummVM/git/trees/e517a20d3b275adceaa0fc71d3f54d37a946e995
then follow one of the urls of the dirs to get the images.
Besides that problem, there is another where is this feature requires a new dependency, probably the C++ port of fuzzywuzzy considering the retroarch requirements to widen the possible ports where the feature is available the most or port the function itself to C which i'm not sure is good because the c++ library would probably work in utf-8 without further trouble.
Fact is this wouldn't be necessary if the database was 'perfect', but the database is not and will never be perfect because there is no automated method that places copies/symlinks/hardlinks of the files that are already there to all the names on the database for variations of the game name where the image is the same. Volunteers - which are few and far between - just add their games, then give up, then eventually rename the files themselves, which is just a symptom of how bad it is in the less popular platforms without ready made thumbnail databases to leech from already.
This would solve that as well as make the manual scanner much less of a second rate citizen for thumbnails at least as well as 'non standard sets' (like TOSEC).
@jdgleaver what do you think?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified in the issue. Start by locating RetroArch's menu thumbnail download path and how manual-scanner names are resolved, then review the proposed GitHub tree lookup and fuzzy-matching approaches. Done requires an agreed cross-platform design, dependency decision, implementation scope, and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, github
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100