Files
romm/backend/endpoints/responses/config.py
Georges-Antoine Assi cf48d371fc feat(emulatorjs): set a default core per platform in config.yml
Add an `emulatorjs.default_cores` block mapping a platform slug to the
core the player preselects for it, so an instance can run DS software on
DeSmuME and DSi software on melonDS without every user picking a core on
every device.

The player resolves its core from the game's remembered core, then the
platform's, then the configured default, then the platform's first
supported core. Each candidate is checked against the cores the platform
actually supports, so an unknown platform or core falls through.

Playing no longer writes the resolved core back to local storage unless
the user picked a different one, so changing the configured default
reaches devices that never made a choice.

Closes #4434

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 08:39:55 -04:00

43 lines
1.5 KiB
Python

from typing import TypedDict
from config.config_manager import EjsControls, MetadataMediaType, NetplayICEServer
class ConfigResponse(TypedDict):
CONFIG_FILE_MOUNTED: bool
CONFIG_FILE_WRITABLE: bool
CONFIG_FILE_PARSE_ERROR: str | None
EXCLUDED_PLATFORMS: list[str]
EXCLUDED_SINGLE_EXT: list[str]
EXCLUDED_SINGLE_FILES: list[str]
EXCLUDED_MULTI_FILES: list[str]
EXCLUDED_MULTI_PARTS_EXT: list[str]
EXCLUDED_MULTI_PARTS_FILES: list[str]
DEFAULT_EXCLUDED_PLATFORM_DIRS: list[str]
DEFAULT_EXCLUDED_MULTI_FILE_DIRS: list[str]
DEFAULT_EXCLUDED_FILES: list[str]
DEFAULT_EXCLUDED_EXTENSIONS: list[str]
PLATFORMS_BINDING: dict[str, str]
PLATFORMS_VERSIONS: dict[str, str]
SKIP_HASH_CALCULATION: bool
EJS_DEBUG: bool
EJS_CACHE_LIMIT: int | None
EJS_DISABLE_AUTO_UNLOAD: bool
EJS_DISABLE_BATCH_BOOTUP: bool
EJS_ENABLE_AUTO_SAVE_SYNC: bool
EJS_NETPLAY_ENABLED: bool
EJS_NETPLAY_ICE_SERVERS: list[NetplayICEServer]
EJS_DEFAULT_CORES: dict[str, str]
EJS_SETTINGS: dict[str, dict[str, str]]
EJS_CONTROLS: dict[str, EjsControls]
SCAN_METADATA_PRIORITY: list[str]
SCAN_ARTWORK_PRIORITY: list[str]
SCAN_ARTWORK_PRIORITY_OVERRIDES: dict[str, list[str]]
SCAN_REGION_PRIORITY: list[str]
SCAN_LANGUAGE_PRIORITY: list[str]
SCAN_MEDIA: list[str]
GAMELIST_AUTO_EXPORT_ON_SCAN: bool
GAMELIST_MEDIA_THUMBNAIL: MetadataMediaType
GAMELIST_MEDIA_IMAGE: MetadataMediaType
PEGASUS_AUTO_EXPORT_ON_SCAN: bool