Fix #2451: Group games with same name but different tags as versions#2984
Fix #2451: Group games with same name but different tags as versions#2984gantoine merged 2 commits intorommapp:masterfrom
Conversation
Summary of ChangesHello @zeroSteiner, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements a crucial enhancement for game organization by enabling the grouping of game files that share the same base name but differ by revision tags. By leveraging a new Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly implements the grouping of games with the same name but different tags by leveraging the fs_name_no_tags field. The changes involve updating the sibling_roms database view, adding a fallback grouping mechanism in roms_handler.py, and creating a supporting index on the fs_name_no_tags column. The implementation is sound. I have one suggestion regarding the new database migration file to improve its long-term maintainability by reducing code duplication.
|
@gantoine Any chance we consider this to be some kind of opt-in toggle instead of default logic? There are plenty of instances where two (or more) official game releases have the same name on a platform but they are not the same game. With this current behavior, unique games get grouped together based purely on their file name even if they have unique metadata IDs. |
Not possible due to technical contraints (virtual tables). It comes down to what's more common: different games with same name on the same platform, or bad/missing metadata sources? |
Hrm, fair enough. The latter is almost certainly more common, but is fixable by community effort of updating the metadata provider(s). The former isn't changing ever however. I don't think this commit really considered this scenario at all to be fair, it's purpose was just to group what in theory should be the same game (i.e. regional variations) via fuzzy logic. I don't have an answer to this right now, but maybe the better solution would be finding an alternative non-fuzzy way to accomplish what this PR set out to do? P.S. My opinion is that the non-fuzzy way is what we already do currently however. If the game has the same metadata ID, it gets grouped. |
|
For my purpose, it's a lot of ROM hacks and games from itch which have multiple versions that I tend to keep in case there's a regression. I think in those cases it would probably polute the metadata providers, especially since this is almost exclusively independently created content. Maybe the vtable could be refined to instead of comparing the name with no tags, compare the name with all non-revision tags. I haven't looked into this but if you think that'd suit your need @Spinnich, I could give it a shot. Would be helpful to have a hand full of edge cases that are causing you issues. |
|
Hey, thank you for getting back to this! To start, I'll list off a few examples but they are all basically the same scenario of two unique official games having the same base name on the same platform. I'll pick on the NES platform since there's a few examples although this is not exclusive to the NES platform by any means. All of these listed games now get grouped together in my RomM instance with this PR. Airwolf (USA) (Acclaim) & Airwolf (Japan) (Kyugo) P.S. I realize one of these is an unlicensed game, but I could not resist having an example of three games with the same name lol.
I definitely understand the desire to lump a bunch of similar unofficial hacks together, but I disagree that it should ever come at the expense of incorrectly lumping games together. Would it not just suffice for you to put all of these versions in a rom folder to group them?
This is over my head but I'm open to a more elegant solution. I am doubtful that fuzzy logic based solely on file names could avoid ever grouping games that shouldn't be. The only thing that comes to mind is perhaps evaluating the metadata IDs first? If two games have two unique metadata IDs, then this logic would not group them... or something to that extent. |
|
I have exampels of this breaking with legit games. Looking here it appears to have grouped Armored Core PSX and its sequals just as "Armored Core". |
|
Going to revert this change in the upcoming 4.8.2 patch release. |
Description
This makes the changes described in #2451 to group files on disk with revision tags as siblings. It also updates the platform view to group them together. It uses
fs_name_no_tagsas suggested in the issue vs my original approach.I did obtain some help from Claude while working on this.
Checklist
Please check all that apply.
Screenshots (if applicable)