-
-
Notifications
You must be signed in to change notification settings - Fork 249
Description
RomM version
4.0.1
Describe the bug
Stored hashes for checking if a game matches RA can be either uppercase or lowercase, but RAHasher seems to return only lowercase. This leads to games not being identified if the stored hash is uppercase.
To Reproduce
Steps to reproduce the behavior:
- Perform complete scan for platform
- Choose a game that is not identified
- Look at MD5 hash
- Check RetroAchievements to see if it matches
Expected behavior
Game's with matching hashes should be found.
Screenshots
Log:
ra_hash.json line:
Game screen:
Scan screen:
Desktop (please complete the following information):
- OS: MacOS
- Browser: Safari
- MacOS 26
Server running this is Ubuntu, running through Docker.
Additional context
Editing the ra_hashes.json entry for the game to match the hash shown in the game's window text-case then correctly identifies the game.
Updated ra_hash.json line:
Game Screen:
Scan log:
Probably an easy fix within backend/handler/metadata/ra_handler.py under the _search_rom function to set each hash entry to lowercase and compare against a lower case search. I haven't actually tested to see if this resolves the issue, but here is a quick crack at it:
Current:
for r in roms:
if ra_hash in r.get("Hashes", ()):
return r
Proposed:
for r in roms:
stored_hashes = [h.lower() for h in r.get("Hashes", ())]
if ra_hash.lower() in stored_hashes:
return r