Skip to content

Conversation

@gantoine
Copy link
Member

@gantoine gantoine commented Dec 14, 2025

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

This PR discovers and imports colocated ES-DE media folders when entries aren't present in gamelist.xml. It also comments out the entire example.config.yml so people stop copying it as-is and opening tickets...

Fixes #2697

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 significantly enhances the system's ability to integrate media assets by introducing a robust mechanism to automatically discover and incorporate media files from standard EmulationStation Desktop Edition (ES-DE) folder structures. This change improves the completeness of game metadata by ensuring that colocated media, even if not explicitly referenced in gamelist.xml, is properly recognized. Additionally, the example configuration has been refined to better assist users in setting up exclusions for common media directories and to reflect updated mapping syntax.

Highlights

  • Automatic Media Discovery: Implemented logic to automatically search for and import media files (such as images, videos, and box art) from colocated EmulationStation Desktop Edition (ES-DE) media folders. This ensures that media not explicitly listed in gamelist.xml can still be found and utilized.
  • Configuration Example Update: The config.example.yml file has been updated to provide clearer guidance. It now includes a comprehensive list of common ES-DE media folders to be excluded from rom scanning and clarifies the updated syntax for platforms and versions mappings.
  • Type Hinting Refinement: A mypy type ignore comment was added to a specific gamelist_metadata.update call in gamelist_handler.py to resolve a type checking warning.
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.

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 adds a useful feature to find co-located media for games not fully detailed in gamelist.xml. The implementation in gamelist_handler.py looks good, but contains a critical bug where it attempts to validate a file path containing a wildcard, which will cause an error. I've left a comment detailing this issue. Additionally, the changes to examples/config.example.yml introduce a breaking change in the format for system.platforms and system.versions, making the example configuration incompatible with the current parser. I've provided suggestions to fix the format. Finally, I've included a minor suggestion to improve code organization and efficiency in gamelist_handler.py.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2025

Test Results

677 tests   676 ✅  1m 19s ⏱️
  1 suites    1 💤
  1 files      0 ❌

Results for commit 9b0311d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11899 7684 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/handler/metadata/gamelist_handler.py 33% 🟢
TOTAL 33% 🟢

updated for commit: 9b0311d by action🐍

@gantoine gantoine requested a review from zurdi15 December 14, 2025 19:19
@gantoine
Copy link
Member Author

/gemini review

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 introduces a significant improvement to the gamelist.xml handling by refactoring the media extraction logic and adding a fallback to discover media in colocated ES-DE folders. The code is now much cleaner and more capable. Additionally, the config.example.yml has been fully commented out to prevent users from misusing it, which is a thoughtful usability improvement.

My review includes a couple of suggestions for the new media discovery logic in gamelist_handler.py to improve determinism and ensure path validation is applied safely.

@@ -1,49 +1,75 @@
# This is a generic example of a configuration file
# Rename this file to `config.yml`, copy it to a `config` folder, and mount that folder as per the docker-compose.example.yml
Copy link
Member

Choose a reason for hiding this comment

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

👌

@gantoine gantoine merged commit 04fcf02 into master Dec 15, 2025
8 checks passed
@gantoine gantoine deleted the romm-2697 branch December 15, 2025 21:25
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] Scraper for ES-DE gamelist.xml does not properly scrape artwork

3 participants