Skip to content

Importing metadata from local launchbox installation#2922

Draft
gravelfreeman wants to merge 8 commits intorommapp:masterfrom
gravelfreeman:launchbox-handler
Draft

Importing metadata from local launchbox installation#2922
gravelfreeman wants to merge 8 commits intorommapp:masterfrom
gravelfreeman:launchbox-handler

Conversation

@gravelfreeman
Copy link

Description

Launchbox handler overhaul. RomM currently only fetches metadata from the LaunchBox database, but many users already have a well-maintained local LaunchBox library. This lets RomM reuse that work instead of scraping everything again.

Supported :

  • Metadata
  • Images
  • Manuals

Requires implementation :

  • Videos

How does RomM access your local LaunchBox installation?

You can mount it to /temp as read only either the full root of Launchbox folder, or just the Data, Images, and Manuals directories as follow :

/temp/Data
/temp/Images
/temp/Manuals

I added a Remote switch in the frontend so you can toggle remote metadata/media fetching.

  • If switch is OFF and there's no /temp folder Launchbox handler will exit.

  • If switch is OFF and there's /temp folder Launchbox handler will search for platforms in mounted Launchbox structure under /temp/Data/Platform/<Platform Name.xml>.

  • If switch is ON and there's no /temp folder Launchbox handler will scrape platforms in your default roms library.

  • If switch is ON and there's /temp folder Launchbox handler will search for platforms in mounted Launchbox structure under /temp/Data/Platform/<Platform Name.xml> and match roms with the local Launchbox metadata in priority and then fallback to Remote metadata.

If you prefer, you can also copy platform XML files one by one into /temp/Data/<Platform Name>.xml to import platforms individually.

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 (if applicable)

image

Copilot AI review requested due to automatic review settings January 19, 2026 18:48
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @gravelfreeman, 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 introduces a major enhancement to the LaunchBox integration within RomM, shifting from an exclusive remote metadata fetching model to one that prioritizes and leverages local LaunchBox installations. Users can now mount their local LaunchBox directories to import game metadata, images, and manuals, reducing reliance on external scraping. The changes include robust logic for identifying and processing local XML files and media, alongside a new user interface control to manage the interplay between local and remote data sources, offering greater flexibility and efficiency for managing game libraries.

Highlights

  • Local LaunchBox Integration: RomM now supports importing metadata, images, and manuals directly from a local LaunchBox installation, allowing users to reuse their existing curated libraries.
  • Flexible Data Sourcing: The system prioritizes local LaunchBox metadata and media if available, with a fallback to remote fetching if local data is not found or if remote enrichment is explicitly enabled.
  • Frontend Control for Remote Fetching: A new 'Remote' switch has been added to the frontend, giving users granular control over whether remote LaunchBox metadata and media fetching is active during scans.
  • Docker Image Optimization: A .dockerignore file was added to significantly reduce the size of Docker images by excluding unnecessary development, testing, and documentation files.
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 introduces a major overhaul of the Launchbox handler to support importing metadata from a local Launchbox installation, in addition to the existing remote database scraping. This is a great feature for users who have already curated their local libraries. The changes are extensive, touching the backend scanning logic, the Launchbox metadata handler, and the frontend UI to add a toggle for this new functionality. The implementation correctly prioritizes local metadata and media, with a fallback to remote sources.

My review focuses on the new logic in launchbox_handler.py, where I've identified a few areas for improvement regarding exception handling, performance, and potential data loss from aggressive filtering. These are important to address to ensure the new feature is robust and reliable. The rest of the changes, including the frontend updates and plumbing the new setting through the backend, look solid.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for importing metadata, images, and manuals from local LaunchBox installations, allowing users to reuse existing LaunchBox libraries instead of re-scraping metadata. The implementation includes a frontend toggle to control whether remote metadata fetching is enabled, and backend logic to parse local XML files and resolve media assets from the mounted LaunchBox directory structure.

Changes:

  • Added UI toggle for LaunchBox remote metadata fetching with local storage persistence
  • Implemented local XML parsing for LaunchBox platform data with caching
  • Added media file resolution for images, screenshots, and manuals from local LaunchBox directories

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
frontend/src/views/Scan.vue Added Remote switch toggle to control LaunchBox remote metadata fetching
frontend/src/locales/en_US/scan.json Added English translation for LaunchBox remote feature
frontend/src/locales/fr_FR/scan.json Added French translation for LaunchBox remote feature
backend/handler/metadata/launchbox_handler.py Major overhaul with local XML parsing, media resolution, and hybrid local/remote metadata support
backend/handler/scan_handler.py Added launchbox_remote_enabled parameter propagation through scan functions
backend/endpoints/sockets/scan.py Threaded launchbox_remote_enabled parameter through WebSocket scan handlers
backend/tasks/scheduled/update_launchbox_metadata.py Changed condition to use LAUNCHBOX_API_ENABLED directly instead of handler check
.dockerignore Added comprehensive ignore patterns for Docker build optimization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gantoine gantoine self-requested a review January 19, 2026 22:00
@gantoine gantoine changed the title add support for importing metadata from a local launchbox installation Importing metadata from a local launchbox installation Jan 19, 2026
@gantoine gantoine changed the title Importing metadata from a local launchbox installation Importing metadata from local launchbox installation Jan 19, 2026
@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 introduces a significant and well-implemented feature: the ability to import metadata and media directly from a local LaunchBox installation. The extensive refactoring in launchbox_handler.py has improved modularity and clarity, breaking down complex logic into smaller, more manageable functions. The new caching mechanism for local XML files, along with the robust handling of local media paths and prioritization over remote sources, demonstrates a thorough approach to the feature. The integration with the existing scanning process and the addition of a UI toggle for remote LaunchBox fetching are also well-executed. This feature will greatly benefit users with existing LaunchBox libraries.

@gantoine gantoine assigned gantoine and unassigned gantoine Jan 29, 2026
@gantoine gantoine self-assigned this Feb 7, 2026
@gantoine gantoine marked this pull request as draft February 7, 2026 03:31
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