mirror of
https://github.com/rommapp/romm.git
synced 2026-07-01 08:16:21 +00:00
Adds the libretro thumbnail repository as a first-class artwork source so region-correct box art (PAL/Europe, Japan, etc.) can be matched directly to ROM filenames, addressing rommapp/romm#3239. Implementation follows the SGDB handler pattern (artwork-only, no game metadata): MetadataSource enum entry, scan-time fetch wired into the SCAN_ARTWORK_PRIORITY loop, /search/roms integration, MatchRom dialog chip + cover selection, and a heartbeat flag. Matching is exact case-insensitive against the directory listing first (so a ROM named "(Europe)" lands on the (Europe) artwork), with a JaroWinkler fuzzy fallback at 0.8 that strips parenthetical tags from both sides. Listings are cached in Redis with a 24h TTL. `libretro_id` is persisted on the Rom model as the SHA1 hex of the matched libretro filename — stable across scans, distinct per region, indexed for lookup. Migration 0077 adds the column. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
65 lines
1.5 KiB
Python
65 lines
1.5 KiB
Python
from typing import TypedDict
|
|
|
|
|
|
class SystemDict(TypedDict):
|
|
VERSION: str
|
|
SHOW_SETUP_WIZARD: bool
|
|
|
|
|
|
class MetadataSourcesDict(TypedDict):
|
|
ANY_SOURCE_ENABLED: bool
|
|
IGDB_API_ENABLED: bool
|
|
SS_API_ENABLED: bool
|
|
MOBY_API_ENABLED: bool
|
|
STEAMGRIDDB_API_ENABLED: bool
|
|
RA_API_ENABLED: bool
|
|
LAUNCHBOX_API_ENABLED: bool
|
|
HASHEOUS_API_ENABLED: bool
|
|
PLAYMATCH_API_ENABLED: bool
|
|
TGDB_API_ENABLED: bool
|
|
FLASHPOINT_API_ENABLED: bool
|
|
HLTB_API_ENABLED: bool
|
|
LIBRETRO_API_ENABLED: bool
|
|
|
|
|
|
class FilesystemDict(TypedDict):
|
|
FS_PLATFORMS: list[str]
|
|
|
|
|
|
class EmulationDict(TypedDict):
|
|
DISABLE_EMULATOR_JS: bool
|
|
DISABLE_RUFFLE_RS: bool
|
|
|
|
|
|
class FrontendDict(TypedDict):
|
|
DISABLE_USERPASS_LOGIN: bool
|
|
YOUTUBE_BASE_URL: str
|
|
|
|
|
|
class OIDCDict(TypedDict):
|
|
ENABLED: bool
|
|
AUTOLOGIN: bool
|
|
PROVIDER: str
|
|
RP_INITIATED_LOGOUT: bool
|
|
|
|
|
|
class TasksDict(TypedDict):
|
|
ENABLE_SCHEDULED_RESCAN: bool
|
|
SCHEDULED_RESCAN_CRON: str
|
|
ENABLE_SCHEDULED_UPDATE_SWITCH_TITLEDB: bool
|
|
SCHEDULED_UPDATE_SWITCH_TITLEDB_CRON: str
|
|
ENABLE_SCHEDULED_UPDATE_LAUNCHBOX_METADATA: bool
|
|
SCHEDULED_UPDATE_LAUNCHBOX_METADATA_CRON: str
|
|
ENABLE_SCHEDULED_CONVERT_IMAGES_TO_WEBP: bool
|
|
SCHEDULED_CONVERT_IMAGES_TO_WEBP_CRON: str
|
|
|
|
|
|
class HeartbeatResponse(TypedDict):
|
|
SYSTEM: SystemDict
|
|
METADATA_SOURCES: MetadataSourcesDict
|
|
FILESYSTEM: FilesystemDict
|
|
EMULATION: EmulationDict
|
|
FRONTEND: FrontendDict
|
|
OIDC: OIDCDict
|
|
TASKS: TasksDict
|