Files
romm/examples/config.example.yml
Georges-Antoine Assi 9dcaf89890 fix: address PR review feedback on library structure and relocation
A grouping folder is no longer also a game. With `{gameDir}` and
`{category}/{gameFile}` declared together, the category folder was surfaced
as a multi-file game *and* descended into, listing its contents twice. A
folder any template descends into is now treated as a grouping level.

Relocation runs for every platform, not only those with a custom structure.
Dropping a platform's template moves every game back to the platform root,
which previously read as a library of new games and orphaned all the saves,
play history, favorites and collection membership. A library whose paths are
unchanged still costs one query and no hashing. This also removes the need
for a manual "apply relocation" toggle.

Physical games are excluded from relocation candidates: they have no file, so
they read as having disappeared from their path on every scan.

A near-miss on the terminal macro (`{gameFolder}` for `{gameDir}`) now names
the offending section instead of only reporting a missing terminal.

Documents two limits the QA pass asked about: a move that also compresses or
extracts the game changes its size and is not detected (the size pre-filter
runs before hashing), and how reverting to the default layout behaves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 17:01:33 -04:00

279 lines
12 KiB
YAML

# 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
# Only uncomment the lines you want to use/modify, or add new ones where needed
# exclude:
# # Exclude platforms to be scanned
# platforms:
# - excluded_folder_a
# - excluded_folder_b
# # Exclude ROMs or parts of ROMs to be scanned
# roms:
# # Single file games section.
# # Will not apply to files that are in sub-folders (multi-disc ROMs, games with updates, DLC, patches, etc.)
# single_file:
# # Exclude all files with certain extensions to be scanned
# extensions:
# - xml
# - txt
# # Exclude matched file names to be scanned
# # Supports unix filename pattern matching
# names:
# - 'info.txt'
# - '._*'
# - '*.nfo'
# # Multi files games section
# # Will apply to files that are in sub-folders (multi-disc ROMs, games with updates, DLC, patches, etc.)
# multi_file:
# # Exclude matched 'folder' names to be scanned (RomM identifies folders as multi file games)
# # Common ES-DE media folders are listed below
# names:
# - 3dboxes
# - backcovers
# - covers
# - fanart
# - manuals
# - marquees
# - miximages
# - physicalmedia
# - screenshots
# - titlescreens
# - videos
# - downloaded_media
# - media
# # Exclude files within sub-folders.
# parts:
# # Exclude matched file names to be scanned from multi file roms
# # Keep in mind that RomM doesn't scan folders inside multi files games,
# # so there is no need to exclude folders from inside of multi files games.
# names:
# - 'data.xml'
# - '._*' # Supports unix filename pattern matching
# # Exclude all files with certain extensions to be scanned from multi file roms
# extensions:
# - xml
# - txt
# system:
# # Asociate different platform names to your current file system platform names
# # [your custom platform folder name]: [RomM platform name]
# # In this example if you have a 'gc' folder, RomM will treat it like the 'ngc' folder
# platforms:
# gc: ngc
# ps1: psx
# # Asociate one platform to it's main version (IGDB only)
# versions:
# naomi: arcade
# filesystem:
# # Custom games folder name only (eg. `retro_games/`)
# roms_folder: 'roms'
# # Skip file hash calculations on low power devices (eg. Raspberry PI)
# skip_hash_calculation: false
# # Skip reading platform-native title IDs out of ROM binaries during scans
# skip_title_id_extraction: false
# # Rename Switch ROMs to embed ` [TITLEID][vVERSION]` in their filename
# embed_switch_title_ids: false
# # Custom library structure, per platform. By default a platform's ROM folder
# # is scanned one level deep: each top-level file is a game and each top-level
# # folder is a single multi-file game. A template lets you describe a deeper /
# # organized layout instead. It is opt-in per platform (by fs_slug); platforms
# # left out keep the default behavior.
# #
# # Syntax (Retrom-style): `/`-separated path sections, relative to the
# # platform's ROM folder (RomM already resolves the library root, the
# # roms_folder above, and the platform directory, so {library}/{platform}
# # are not used here). A section wrapped in braces is a macro; a bare section
# # is a literal folder name matched exactly. The LAST section must be a
# # terminal macro:
# # - {gameFile} -> each file at that level is its own game;
# # - {gameDir} -> each folder at that level is a single multi-file game.
# # Any other braced section (e.g. {region}, {category}) is a wildcard
# # directory level: it matches any folder and is purely organizational.
# #
# # A platform may also declare a LIST of templates instead of one; discovery
# # is their union. This covers the common mixed layout (loose games at the
# # platform root AND games inside grouping subfolders below it) which a
# # single fixed-depth template can't express on its own.
# #
# # Notes:
# # - Hidden (dot-prefixed) folders are never descended into or surfaced.
# # - {gameDir} keeps a folder whole (multi-disc / cue+bin games), so there
# # is no guessing, you declare file-vs-folder explicitly.
# # - Identity is content-based on scan: moving or renaming a game within the
# # structure is detected by its hash and relocated in place, so its saves,
# # play history, favorites and collection membership follow it (as long as
# # hashing is enabled and the platform is hashable). When a folder that was
# # previously scanned as one multi-file game is now descended into, the old
# # entry is marked "missing from filesystem" (the scan log flags it);
# # delete the stale entry to clean up.
# # - Relocation is also how a platform reverts to the default layout:
# # removing its template moves every game back to the platform root, and
# # each one is matched by hash rather than re-imported.
# # - A move that also changes a game's size (compressing it into an archive,
# # or extracting one) is NOT detected as a relocation: a cheap size
# # pre-filter runs before hashing. Such a game is re-imported as new and
# # the old entry is flagged missing. Move first, repack later.
# # - A folder that a template descends into is a grouping level, not a game.
# # With `{gameDir}` and `{category}/{gameFile}` together, a folder holding
# # discovered games is a category; only folders no template descends into
# # stay multi-file games.
# # - Two files with the same name in different folders become distinct games;
# # gamelist.xml metadata matching is by filename, so both may match the
# # same gamelist entry.
# structure:
# # Mixed: loose top-level games AND grouping subfolders below them, e.g.
# # roms/nes/game01.nes (matched by {gameFile})
# # roms/nes/Hacks/game03.nes (matched by {category}/{gameFile})
# nes:
# - '{gameFile}'
# - '{category}/{gameFile}'
# # roms/ps3/Disc/Game/, roms/ps3/PSN/Game/ -> each folder a multi-file game
# ps3: '{category}/{gameDir}'
# # roms/snes/USA/foo.sfc, roms/snes/Japan/bar.sfc
# snes: '{region}/{gameFile}'
# scan:
# # Metadata priority during scans
# priority:
# # Below are the default priority values used
# metadata: # Top-level metadata source priority
# - igdb # IGDB (highest priority)
# - moby # MobyGames
# - ss # Screenscraper
# - ra # RetroAchievements
# - launchbox # Launchbox
# - gamelist # ES-DE gamelist.xml
# - hasheous # Hasheous
# - flashpoint # Flashpoint Project
# - steam # Steam (PC platforms only)
# - hltb # HowLongToBeat (lowest priority)
# artwork: # Cover art and screenshots
# - igdb # IGDB
# - moby # MobyGames
# - ss # Screenscraper
# - ra # RetroAchievements
# - launchbox # Launchbox
# - libretro # Libretro
# - gamelist # ES-DE gamelist.xml
# - hasheous # Hasheous
# - flashpoint # Flashpoint Project
# - steam # Steam (PC platforms only)
# - hltb # HowLongToBeat
# # Optional per-field overrides, each falls back to "artwork" when omitted
# cover: # Cover art only
# - igdb
# - ss
# screenshot: # Screenshots only
# - ss
# - igdb
# manual: # Game manuals only
# - launchbox
# region: # Used by IGDB and ScreenScraper for regional variants
# - us
# - wor
# - ss
# - eu
# - jp
# region_mode: prefer_rom_tags # Region tags win over priority list
# language: # Used by ScreenScraper for descriptions
# - en
# - fr
# # Media assets to download
# # Only used by Screenscraper and ES-DE gamelist.xml
# media:
# # Used as alternative cover art
# - box2d # Normal cover art (always enabled)
# - box3d # 3D box art
# - miximage # Mixed image of multiple media (v1 / mixrbv1)
# - miximage_v2 # Mixed image of multiple media (v2 / mixrbv2)
# - physical # Disc, cartridge, etc.
# # Added to the screenshots carousel
# - screenshot # Screenshot (enabled by default)
# # Shown in the artwork gallery
# - title_screen # Title screen
# - fanart # User uploaded artwork
# # Bezel displayed around the emulatorjs window
# - bezel
# # Manual in PDF format
# - manual # Manual (enabled by default)
# # Gameplay video
# - video # Video (warning: large file size)
# - video_normalized # Normalized video (smaller file size than video)
# # Media used for batocera gamelist.xml export
# - box2d_back # Back cover art
# - box2d_side # Box spine (enables the interactive 3D box on detail pages)
# - logo # Transparent logo
# # Other media assets (might be used in the future)
# - marquee # Custom marquee
# # Auto-export metadata files after scan completes
# gamelist:
# export: false # Whether to export gamelist.xml for ES-DE/Batocera/RetroBAT (merged into an existing file)
# media:
# # Select a media type from the list above (eg. box2d, screenshot, etc.)
# thumbnail: box2d # Use as the <thumbnail> tag in the exported gamelist.xml
# image: screenshot # Use as the <image> tag in the exported gamelist.xml
# pegasus:
# export: false # Whether to export metadata.pegasus.txt for Pegasus (merged into an existing file)
# EmulatorJS per-core options
# emulatorjs:
# debug: true # Available options will be logged to the browser console
# cache_limit: null # Cache limit per ROM (in bytes)
# disable_batch_bootup: false
# disable_auto_unload: false
# auto_save_sync: false # Upload the save to the server whenever it changes, without Save & Quit
# settings:
# parallel_n64: # Use the exact core name
# vsync: disabled
# snes9x:
# snes9x_region: ntsc
# default: # These settings apply to all cores
# fps: show
# netplay:
# enabled: true
# ice_servers:
# - urls: "stun:stun.relay.metered.ca:80"
# - urls: "turn:global.relay.metered.ca:80"
# username: "<username>"
# credential: "<password>"
# controls: # https://emulatorjs.org/docs4devs/control-mapping/
# snes9x:
# 0: # Player 1
# 0: # A MAPPING FOR EACH BUTTON MUST BE SET!
# value: x # Mapping for keyboard
# value2: BUTTON_2 # Mapping for connected controller
# 1: # Player 2
# 2: # Player 3
# 3: # Player 4
# Emulator streaming: play a ROM through a real emulator in a webstation
# container, streamed to the browser.
# Supported platforms, emulators and BIOS requirements:
# https://docs.romm.app/latest/using/emulator-streaming/
#
# streaming:
# enabled: true
# containers:
# # One container can serve many platforms. Container keys are defaults
# # for every platform it serves; a platform block may override emulator,
# # label, and memory_card_sync.
# - protocol: webstation
# host: https://192.168.1.56:3010 # browser-facing UI, must be https
# subfolder: /streaming # matches the container's SUBFOLDER
# library_path: /romm # where it mounts your ROM library
# broker_secret: change-me # matches the container's BROKER_SECRET
# label: Emulation station
# broker_host: http://192.168.1.56:3010 # server-to-broker URL, when RomM can't dial `host` itself
# platforms:
# snes: retroarch # the emulator name directly...
# ps2: # ...or a block overriding container keys
# emulator: pcsx2
# memory_card_sync: true