[Feature] Support Japanese and other regional Switch TitleDB imports

Open
#5,606 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by reading UpdateSwitchTitleDBTask (the task downloads a hardcoded US.en.json URL) and update_switch_titledb.py, especially TITLEDB_REGION_LANG_MAP. Trace how the downloaded dataset feeds the title-ID cache and where configuration is stored, then decide how multiple regional files should merge and how language preference should resolve overlaps. Done means selected datasets such as US.en and JP.ja are imported by manual/scheduled updates and title-ID lookups resolve against them.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.

Japanese Switch games can have valid title IDs and entries in the upstream TitleDB but still lack title-ID-based metadata in RomM because the built-in Switch TitleDB update task imports only US.en.json.

Environment: Docker image rommapp/romm:5.4.1.

Two examples confirmed in upstream JP.ja.json:

Switch title ID Japanese eShop ID Name
0100815009DD4000 70010000007401 ファミコレADV STEINS;GATE
010049A022BA0000 70010000094772 BLACK WOLVES SAGA -Weiβ und Schwarz- for Nintendo Switch

Source: https://github.com/blawar/titledb/blob/master/JP.ja.json

Both games were discovered by RomM, but automatic metadata matching failed in the previous installation (5.3.0-alpha.2). After upgrading, inspection of the 5.4.1 image confirmed that UpdateSwitchTitleDBTask still hardcodes:

url="https://raw.githubusercontent.com/blawar/titledb/master/US.en.json"

I have not yet tested a Japanese-cache import followed by a rescan on 5.4.1. This report concerns the regional database limitation, rather than claiming that it is the only cause of the original matching failures.

Describe the solution you'd like

Please allow selecting one or more Switch TitleDB region/language combinations, such as US.en and JP.ja, through configuration or the UI, and have the existing manual/scheduled update task import them.

Ideally:

  • Maintain title-ID/product-ID lookups across the selected regional datasets.
  • Use a configurable language preference when entries overlap.
  • Preserve this configuration across restarts and cache rebuilds.
  • Document any existing supported way to do this, if one already exists.

Describe alternatives you've considered

  • Manual metadata identification for each game.
  • A custom in-container Japanese TitleDB cache importer, which would depend on internal cache formats and need to coexist with scheduled updates.
  • Supplying the title ID in a game-folder name can help filename-based lookups, but cannot provide a regional database record that was never imported.

Additional context

The image's update_switch_titledb.py already lists JP: ["ja"] in TITLEDB_REGION_LANG_MAP, but the update task's download URL is fixed to US English.

There were also separate issues in the original installation: an incorrect library layout setting (now fixed), an unpopulated/outdated TitleDB cache, and binary title-ID extraction failing with decryption key required. For these folder-based games, the title IDs were present in the inner NSP filenames, not the folder names supplied to metadata matching. Those are separate from the request to make Japanese TitleDB records available through supported configuration.

Dominant language
Python
Stars
13.3k
Forks
747
Avg merge
20h 58m
Merged PRs (30d)
207

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rommapp/romm

All issues in rommapp/romm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.