Files
romm/backend/endpoints/responses/config.py
Georges-Antoine Assi 191cd1f24c feat(config): editable v2 UI for scan settings
Expose the scan.* section of config.yml (metadata & artwork priority,
per-field artwork overrides, region priority, language priority, media
types, gamelist and pegasus export) in an editable v2 Settings page.

Backend:
- Add PUT /api/config/scan (platforms.write) with a validated
  ScanSettingsPayload and ConfigManager.update_scan_settings().
- Expose GAMELIST_AUTO_EXPORT_ON_SCAN and PEGASUS_AUTO_EXPORT_ON_SCAN
  in ConfigResponse / GET /api/config.
- Preserve the streaming section on runtime config writes (previously
  dropped on every write).

Frontend:
- New Settings/ScanSettings.vue page + ScanPriorityList.vue reorderable
  list (drag + up/down for keyboard/gamepad); region/language use
  RComboboxField.
- Wire the scan-settings route, permissions, and sidebar entry.
- Regenerate OpenAPI types; add all new strings to every locale.

Closes #3849

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 11:24:31 -04:00

40 lines
1.4 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_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_NETPLAY_ENABLED: bool
EJS_NETPLAY_ICE_SERVERS: list[NetplayICEServer]
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