From eebca34e533697368bc2e3dd9de626799022f858 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Fri, 26 Dec 2025 11:53:30 -0500 Subject: [PATCH] [ROMM-2806] Fix arcade ssid in screenscraper --- backend/handler/metadata/ss_handler.py | 82 +++----------------------- 1 file changed, 7 insertions(+), 75 deletions(-) diff --git a/backend/handler/metadata/ss_handler.py b/backend/handler/metadata/ss_handler.py index c1646bd67..7d3715bf1 100644 --- a/backend/handler/metadata/ss_handler.py +++ b/backend/handler/metadata/ss_handler.py @@ -61,76 +61,7 @@ PS1_SS_ID: Final = 57 PS2_SS_ID: Final = 58 PSP_SS_ID: Final = 61 SWITCH_SS_ID: Final = 225 -ARCADE_SS_IDS: Final = [ - 6, - 7, - 8, - 47, - 49, - 52, - 53, - 54, - 55, - 56, - 68, - 69, - 75, - 112, - 142, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182, - 183, - 184, - 185, - 186, - 187, - 188, - 189, - 190, - 191, - 192, - 193, - 194, - 195, - 196, - 209, - 227, - 130, - 158, - 269, -] +ARCADE_SS_ID: Final = 75 # Regex to detect ScreenScraper ID tags in filenames like (ssfr-12345) SS_TAG_REGEX = re.compile(r"\(ssfr-(\d+)\)", re.IGNORECASE) @@ -720,7 +651,7 @@ class SSHandler(MetadataHandler): ) # Support for MAME arcade filename format - if platform_ss_id in ARCADE_SS_IDS: + if platform_ss_id == ARCADE_SS_ID: search_term = await self._mame_format(search_term) fallback_rom = SSRom(ss_id=None, name=search_term) @@ -805,6 +736,7 @@ SCREENSAVER_PLATFORM_LIST: dict[UPS, SlugToSSId] = { UPS.ANDROID: {"id": 63, "name": "Android"}, UPS.APPLEII: {"id": 86, "name": "Apple II"}, UPS.APPLE_IIGS: {"id": 51, "name": "Apple IIGS"}, + UPS.ARCADE: {"id": ARCADE_SS_ID, "name": "Arcade"}, UPS.ARCADIA_2001: {"id": 94, "name": "Arcadia 2001"}, UPS.ARDUBOY: {"id": 263, "name": "Arduboy"}, UPS.ATARI2600: {"id": 26, "name": "Atari 2600"}, @@ -882,7 +814,7 @@ SCREENSAVER_PLATFORM_LIST: dict[UPS, SlugToSSId] = { UPS.N64DD: {"id": 122, "name": "Nintendo 64DD"}, UPS.NDS: {"id": 15, "name": "Nintendo DS"}, UPS.NINTENDO_DSI: {"id": 15, "name": "Nintendo DS"}, - UPS.SWITCH: {"id": 225, "name": "Switch"}, + UPS.SWITCH: {"id": SWITCH_SS_ID, "name": "Switch"}, UPS.ODYSSEY_2: {"id": 104, "name": "Videopac G7000"}, UPS.OPENBOR: {"id": 214, "name": "OpenBOR"}, UPS.ORIC: {"id": 131, "name": "Oric 1 / Atmos"}, @@ -891,11 +823,11 @@ SCREENSAVER_PLATFORM_LIST: dict[UPS, SlugToSSId] = { UPS.PC_FX: {"id": 72, "name": "PC-FX"}, UPS.PICO: {"id": 234, "name": "Pico-8"}, UPS.PSVITA: {"id": 62, "name": "PS Vita"}, - UPS.PSP: {"id": 61, "name": "PSP"}, + UPS.PSP: {"id": PSP_SS_ID, "name": "PSP"}, UPS.PALM_OS: {"id": 219, "name": "Palm OS"}, UPS.PHILIPS_VG_5000: {"id": 261, "name": "Philips VG 5000"}, - UPS.PSX: {"id": 57, "name": "Playstation"}, - UPS.PS2: {"id": 58, "name": "Playstation 2"}, + UPS.PSX: {"id": PS1_SS_ID, "name": "Playstation"}, + UPS.PS2: {"id": PS2_SS_ID, "name": "Playstation 2"}, UPS.PS3: {"id": 59, "name": "Playstation 3"}, UPS.PS4: {"id": 60, "name": "Playstation 4"}, UPS.PS5: {"id": 284, "name": "Playstation 5"},