Skip to content

Conversation

@jellydn
Copy link

@jellydn jellydn commented Dec 20, 2025

What

Fixes the "SD1 catalogue path is not set" error that prevents ROM downloads on devices running generic EmulationStation setups (such as Knulli on PortMaster).

Why

Previously, the catalogue path was only initialized for MuOS and SpruceOS devices. Users with other devices (Knulli, PortMaster, generic ES setups) encountered a critical error when trying to download ROMs:

ValueError: SD1 catalogue path is not set.

This left a significant portion of users unable to use the ROM download functionality, as the app would crash during download attempts.

How

The fix adds proper catalogue path initialization for all device types:

  1. Environment Variable Support: Added CATALOGUE_PATH environment variable for users who want to customize the catalogue location
  2. Sensible Default: Sets /app/catalogue as the default catalogue directory for non-MuOS/non-SpruceOS devices
  3. Auto-Creation: Automatically creates the catalogue directory if it doesn't exist with proper permissions
  4. Graceful Error Handling: If directory creation fails, logs the error but allows the app to continue running

Code Changes:

  • Modified _Filesystem.__init__() in RomM/filesystem.py
  • Added catalogue path initialization logic after existing MuOS/SpruceOS checks
  • Implemented directory creation with error handling and logging

Test Plan:

  • Verify ROM downloads work on Knulli/PortMaster without errors
  • Test CATALOGUE_PATH environment variable override functionality
  • Ensure existing MuOS/SpruceOS functionality remains unchanged
  • Test error handling when directory cannot be created
  • Verify catalogue directory is created with correct permissions

This change expands device compatibility and ensures all users can utilize the ROM download feature regardless of their handheld device or setup.

This change ensures that the catalogue directory is properly configured
and created for devices running generic EmulationStation setups
(such as Knulli on PortMaster), preventing download errors when
the catalogue path is not initialized.

Changes:
- Add CATALOGUE_PATH environment variable support
- Set default catalogue path in app directory
- Auto-create catalogue directory if it doesn't exist
- Graceful error handling if directory creation fails

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @jellydn, 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 addresses a critical bug that prevented ROM downloads on generic EmulationStation setups by ensuring the catalogue path is correctly initialized and managed across all device types. By introducing an environment variable for customization and implementing robust directory creation with error handling, the changes significantly improve the application's compatibility and reliability for a wider range of devices.

Highlights

  • Catalogue Path Initialization: The pull request fixes an issue where the SD1 catalogue path was not initialized for non-MuOS/non-SpruceOS devices, leading to download failures.
  • Environment Variable Support: Introduces support for the CATALOGUE_PATH environment variable, allowing users to customize the catalogue directory.
  • Default Catalogue Path: Sets a sensible default catalogue path to /app/catalogue if the environment variable is not specified.
  • Directory Creation and Error Handling: Automatically creates the catalogue directory if it doesn't exist and includes graceful error handling for directory creation failures.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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

@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 effectively addresses the ValueError that occurred on non-MuOS/non-SpruceOS devices by ensuring the catalogue path is always initialized. The solution to use an environment variable for customization, provide a sensible default, and automatically create the directory is well-thought-out. My review includes one suggestion to improve the exception handling to be more specific, which will make the code more robust. Overall, this is a good fix that improves compatibility for a wider range of devices.

@jellydn jellydn marked this pull request as ready for review December 21, 2025 02:01
@gantoine gantoine closed this Jan 8, 2026
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