Skip to content

Conversation

@vargash
Copy link
Contributor

@vargash vargash commented Nov 23, 2025

Description
Updated mediatypes and logic for the /gamelist/export API to try and generate a Batocera-like gamelist.xml.
The aim is to use RomM as the central owner of all the metadata, generating gamelist.xml ready to feed to Batocera/ES.
Main changes are:

  • added support for missing wheel and box2d_back media types from ScreenScraper
  • added local-file option for fanart media type
  • fixed cover path to remove double path in gamelist.xml
  • updated gamelist.xml tags to match the Batocera XML schema
  • added a local_path parameter in export API to use local rom path in place of https URL

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

Screenshots

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @vargash, 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 gamelist.xml export functionality to better support Batocera and EmulationStation. It focuses on improving metadata accuracy and media asset handling, allowing users to generate a more complete and correctly formatted gamelist.xml directly from RomM, including options for local file paths. This change streamlines the process of integrating RomM's metadata with popular frontend systems.

Highlights

  • Batocera Gamelist XML Generation: The /gamelist/export API has been updated to generate a gamelist.xml file that is more compatible with Batocera/EmulationStation, aiming to use RomM as the central metadata owner.
  • New Media Types Support: Added support for wheel and box2d_back media types from ScreenScraper, enhancing the visual assets available for games.
  • Local File Options for Media: Introduced a local-file option for the fanart media type and added a local_path parameter to the export API, allowing the use of local ROM paths instead of HTTPS URLs in the generated XML.
  • Gamelist XML Tag Updates: The gamelist.xml tags have been updated to better match the Batocera XML schema, including changing the cover tag to thumbnail and backcover to boxback.
  • Cover Path Correction: Fixed an issue where the cover path in the gamelist.xml would contain a double path.
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 aims to improve the gamelist.xml export to better match the Batocera format. The changes include adding new media types (wheel, box2d_back), fixing path generation for covers, and adding an option to use local paths.

The implementation is mostly correct, but I've found a few issues:

  • There's a minor bug in ss_handler.py where box2d_back media is saved to the wrong directory.
  • In gamelist_exporter.py, some media types (miximage, physical, title_screen) are not correctly referenced from ss_metadata, which will result in them being omitted from the exported XML.
  • The example configuration file config.example.yml contains a typo for a new media type that would cause an error if used.

I've left specific comments with suggestions to fix these issues. Once they are addressed, this PR will be a great improvement to the gamelist export functionality.

Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

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

good so far, need to double-check wheel and box-2d-back from the screenscraper response

@gantoine
Copy link
Member

/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 updates the /gamelist/export endpoint to generate a Batocera-compatible gamelist.xml. The changes include adding support for new media types, fixing path generation, and introducing an option for local path exports. The implementation is solid and directly addresses the goals outlined in the description. I've identified a couple of areas where code duplication can be reduced to improve maintainability and have provided suggestions for refactoring. Overall, these are valuable improvements.

@gantoine gantoine merged commit 11dd607 into rommapp:master Nov 25, 2025
1 of 2 checks passed
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