Skip to content

Commit 6bd6264

Browse files
authored
Merge pull request #2807 from rommapp/romm-2806
[ROMM-2806] Fix arcade ssid in screenscraper
2 parents 2b6788b + eebca34 commit 6bd6264

File tree

1 file changed

+7
-75
lines changed

1 file changed

+7
-75
lines changed

backend/handler/metadata/ss_handler.py

Lines changed: 7 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -61,76 +61,7 @@ def get_preferred_media_types() -> list[MetadataMediaType]:
6161
PS2_SS_ID: Final = 58
6262
PSP_SS_ID: Final = 61
6363
SWITCH_SS_ID: Final = 225
64-
ARCADE_SS_IDS: Final = [
65-
6,
66-
7,
67-
8,
68-
47,
69-
49,
70-
52,
71-
53,
72-
54,
73-
55,
74-
56,
75-
68,
76-
69,
77-
75,
78-
112,
79-
142,
80-
147,
81-
148,
82-
149,
83-
150,
84-
151,
85-
152,
86-
153,
87-
154,
88-
155,
89-
156,
90-
157,
91-
158,
92-
159,
93-
160,
94-
161,
95-
162,
96-
163,
97-
164,
98-
165,
99-
166,
100-
167,
101-
168,
102-
169,
103-
170,
104-
173,
105-
174,
106-
175,
107-
176,
108-
177,
109-
178,
110-
179,
111-
180,
112-
181,
113-
182,
114-
183,
115-
184,
116-
185,
117-
186,
118-
187,
119-
188,
120-
189,
121-
190,
122-
191,
123-
192,
124-
193,
125-
194,
126-
195,
127-
196,
128-
209,
129-
227,
130-
130,
131-
158,
132-
269,
133-
]
64+
ARCADE_SS_ID: Final = 75
13465

13566
# Regex to detect ScreenScraper ID tags in filenames like (ssfr-12345)
13667
SS_TAG_REGEX = re.compile(r"\(ssfr-(\d+)\)", re.IGNORECASE)
@@ -720,7 +651,7 @@ async def get_rom(self, rom: Rom, file_name: str, platform_ss_id: int) -> SSRom:
720651
)
721652

722653
# Support for MAME arcade filename format
723-
if platform_ss_id in ARCADE_SS_IDS:
654+
if platform_ss_id == ARCADE_SS_ID:
724655
search_term = await self._mame_format(search_term)
725656
fallback_rom = SSRom(ss_id=None, name=search_term)
726657

@@ -805,6 +736,7 @@ class SlugToSSId(TypedDict):
805736
UPS.ANDROID: {"id": 63, "name": "Android"},
806737
UPS.APPLEII: {"id": 86, "name": "Apple II"},
807738
UPS.APPLE_IIGS: {"id": 51, "name": "Apple IIGS"},
739+
UPS.ARCADE: {"id": ARCADE_SS_ID, "name": "Arcade"},
808740
UPS.ARCADIA_2001: {"id": 94, "name": "Arcadia 2001"},
809741
UPS.ARDUBOY: {"id": 263, "name": "Arduboy"},
810742
UPS.ATARI2600: {"id": 26, "name": "Atari 2600"},
@@ -882,7 +814,7 @@ class SlugToSSId(TypedDict):
882814
UPS.N64DD: {"id": 122, "name": "Nintendo 64DD"},
883815
UPS.NDS: {"id": 15, "name": "Nintendo DS"},
884816
UPS.NINTENDO_DSI: {"id": 15, "name": "Nintendo DS"},
885-
UPS.SWITCH: {"id": 225, "name": "Switch"},
817+
UPS.SWITCH: {"id": SWITCH_SS_ID, "name": "Switch"},
886818
UPS.ODYSSEY_2: {"id": 104, "name": "Videopac G7000"},
887819
UPS.OPENBOR: {"id": 214, "name": "OpenBOR"},
888820
UPS.ORIC: {"id": 131, "name": "Oric 1 / Atmos"},
@@ -891,11 +823,11 @@ class SlugToSSId(TypedDict):
891823
UPS.PC_FX: {"id": 72, "name": "PC-FX"},
892824
UPS.PICO: {"id": 234, "name": "Pico-8"},
893825
UPS.PSVITA: {"id": 62, "name": "PS Vita"},
894-
UPS.PSP: {"id": 61, "name": "PSP"},
826+
UPS.PSP: {"id": PSP_SS_ID, "name": "PSP"},
895827
UPS.PALM_OS: {"id": 219, "name": "Palm OS"},
896828
UPS.PHILIPS_VG_5000: {"id": 261, "name": "Philips VG 5000"},
897-
UPS.PSX: {"id": 57, "name": "Playstation"},
898-
UPS.PS2: {"id": 58, "name": "Playstation 2"},
829+
UPS.PSX: {"id": PS1_SS_ID, "name": "Playstation"},
830+
UPS.PS2: {"id": PS2_SS_ID, "name": "Playstation 2"},
899831
UPS.PS3: {"id": 59, "name": "Playstation 3"},
900832
UPS.PS4: {"id": 60, "name": "Playstation 4"},
901833
UPS.PS5: {"id": 284, "name": "Playstation 5"},

0 commit comments

Comments
 (0)