Skip to content

Conversation

@gantoine
Copy link
Member

@gantoine gantoine commented Dec 8, 2025

Description
Explain the changes or enhancements you are proposing with this pull request.

Fixes #2722

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @gantoine, 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 primarily focuses on enhancing the accuracy of metadata matching, particularly for ScreenScraper, by improving how special characters are handled in search terms. It refines the regular expression used for normalizing these terms and adjusts their formatting before querying external services. Additionally, it includes minor adjustments to default parameter values for the RetroAchievements API and a small documentation correction.

Highlights

  • Improved Special Character Matching: The regular expression used for normalizing search terms has been refined to specifically require at least one whitespace character after colons or hyphens, which enhances the accuracy of search queries.
  • ScreenScraper Search Term Formatting: The formatting of normalized search terms sent to ScreenScraper has been updated, replacing colons with hyphens to improve the success rate of matching game titles with special characters.
  • RetroAchievements API Parameter Defaults: The limit and offset parameters in the get_game_list function for the RetroAchievements API now default to 0 instead of None, standardizing their initial values.
  • Minor Code Cleanups: A type ignore comment has been added for a req.url.update_query call, and a comment in scan_handler.py has been corrected from 'IGDB ID' to 'RA ID' for clarity.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gantoine gantoine requested a review from zurdi15 December 8, 2025 00:13
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to fix issues with matching special characters when searching on ScreenScraper by adjusting the search term normalization logic. The regex for normalization is now more specific to avoid incorrect replacements, and the separator is changed to a hyphen, which likely improves search results. Additionally, a comment in the scan handler has been corrected for clarity. However, I've found a potential issue in retroachievements.py where changes to default parameters in get_game_list could lead to incorrect API calls and empty results. Please see my detailed comment on that file.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Test Results

677 tests  ±0   676 ✅ ±0   1m 16s ⏱️ -1s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 76d445c. ± Comparison against base commit 1b566b2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11714 7571 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/adapters/services/retroachievements.py 76% 🟢
backend/handler/metadata/base_handler.py 96% 🟢
backend/handler/metadata/ss_handler.py 31% 🟢
backend/handler/scan_handler.py 58% 🟢
TOTAL 65% 🟢

updated for commit: 76d445c by action🐍

@gantoine gantoine merged commit bf3188a into master Dec 9, 2025
8 checks passed
@gantoine gantoine deleted the romm-2722 branch December 9, 2025 18:41
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.

[Bug] RA Not Matching

3 participants