Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how ROMs are looked up for profiles #153

Merged
merged 2 commits into from
Dec 14, 2023
Merged

Conversation

hanzi
Copy link
Collaborator

@hanzi hanzi commented Dec 13, 2023

When loading a profile, the bot has two approaches to find the correct ROM:

  1. Find a ROM with the exact name stated in the profile's metadata.yml
  2. If that fails, find a ROM that matches in game title, version number and language code.

Unfortunately, there was a bug with the second approach because the bot compared a string (from metadata.yml) with an Enum (from load_rom_data()) which caused that check to always fail.

So effectively, unless the ROM file name matched the bot would always complain about the ROM missing.

This makes sharing profiles for debugging/testing purposes harder.

When loading a profile, the bot has two approaches to find the correct ROM:

1. Find a ROM with the exact name stated in the profile's `metadata.yml`
2. If that fails, find a ROM that matches in game title, version number and language code.

Unfortunately, there was a bug with the second approach because the bot compared a string (from `metadata.yml`) with an Enum (from `load_rom_data()`) which caused that check to always fail.

So effectively, unless the ROM file name matched the bot would always complain about the ROM missing.
@hanzi hanzi requested a review from 40Cakes December 13, 2023 00:06
@40Cakes 40Cakes merged commit f9a8b90 into 40Cakes:main Dec 14, 2023
1 check passed
@hanzi hanzi deleted the fix-rom-lookup branch January 7, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants