Skip to content

[Bug] Games not identified for RetroAchievements if case does not match exactly #2182

@AlexMKramer

Description

@AlexMKramer

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:

  1. Perform complete scan for platform
  2. Choose a game that is not identified
  3. Look at MD5 hash
  4. Check RetroAchievements to see if it matches

Expected behavior
Game's with matching hashes should be found.

Screenshots
Log:
Image
ra_hash.json line:
Image
Game screen:
Image
Scan screen:
Image

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:
Image
Game Screen:
Image
Scan log:
Image

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions