fix(ss): map New Nintendo 3DS to ScreenScraper system 17

New Nintendo 3DS games never matched ScreenScraper because the platform
was missing from SCREENSAVER_PLATFORM_LIST. With no entry, get_platform()
returns ss_id=None and scan_handler skips the entire ScreenScraper lookup
(hash and filename) for the platform, reporting everything as unmatched.

ScreenScraper has no separate New 3DS system; New 3DS games live under the
regular Nintendo 3DS system (ID 17). Alias New Nintendo 3DS to that system,
matching the existing Famicom->NES, Super Famicom->SNES, and DSi->DS aliases.

Fixes #3464

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
SpinnichandClaude Opus 4.8 committed 2026-06-02 00:21:48 +00:00
1 parent 85789466d1
commit 3be7d9040f
2 files changed
+43

No files matched your search

+1
View File
@@ -997,6 +997,7 @@ SCREENSAVER_PLATFORM_LIST: dict[UPS, SlugToSSId] = {
"name": "Neo-Geo Pocket Color",
},
UPS.N3DS: {"id": 17, "name": "Nintendo 3DS"},
UPS.NEW_NINTENDON3DS: {"id": 17, "name": "Nintendo 3DS"},
UPS.N64: {"id": 14, "name": "Nintendo 64"},
UPS.N64DD: {"id": 122, "name": "Nintendo 64DD"},
UPS.NDS: {"id": 15, "name": "Nintendo DS"},
@@ -667,6 +667,48 @@ class TestAddSsAuthToUrl:
assert download_query.get("systemeid") == ["1"]
class TestGetPlatform:
"""Tests for SSHandler.get_platform — the slug → ScreenScraper system map."""
# ScreenScraper has no separate "New Nintendo 3DS" system; New 3DS games
# live under the regular Nintendo 3DS system (ID 17).
NINTENDO_3DS_SS_ID = 17
def test_nintendo_3ds_maps_to_system_17(self):
"""Regression guard: the regular Nintendo 3DS still resolves to ID 17."""
handler = SSHandler()
platform = handler.get_platform("3ds")
assert platform["ss_id"] == self.NINTENDO_3DS_SS_ID
assert platform["slug"] == "3ds"
def test_new_nintendo_3ds_maps_to_nintendo_3ds_system(self):
"""New Nintendo 3DS must resolve to ScreenScraper's Nintendo 3DS system
(ID 17), the same way Famicom→NES and Super Famicom→SNES alias."""
handler = SSHandler()
platform = handler.get_platform("new-nintendo-3ds")
assert platform["ss_id"] == self.NINTENDO_3DS_SS_ID
assert platform["slug"] == "new-nintendo-3ds"
def test_new_nintendo_3ds_shares_system_with_regular_3ds(self):
"""Both 3DS variants point at the same ScreenScraper system id."""
handler = SSHandler()
assert (
handler.get_platform("new-nintendo-3ds")["ss_id"]
== handler.get_platform("3ds")["ss_id"]
)
def test_unmapped_platform_returns_none_ss_id(self):
"""A slug with no ScreenScraper mapping yields ss_id=None (lookup skipped)."""
handler = SSHandler()
platform = handler.get_platform("not-a-real-platform")
assert platform["ss_id"] is None
assert platform["slug"] == "not-a-real-platform"
class TestGetRomType:
def _file(self, ext: str, top_level: bool = True) -> MagicMock:
f = MagicMock()