get_supported_platforms() resolved tgdb_id from the MobyGames and
Hasheous platform entries only, but MobyGames platforms never carry a
tgdb_id and the Hasheous platform list has no TGDB mappings, so the
explicit key always overrode the value spread from the TGDB handler
with None. Mirror the fallback chain used during scans in
scan_handler.py by falling back to the TGDB platform entry itself.
Co-Authored-By: Claude <noreply@anthropic.com>
get_supported_platforms built a slug->platform map with a plain dict
comprehension. When a folder is mapped as a variant or alias of an
existing platform, scanning resolves it to the parent slug, so two
platform rows share the same slug. The comprehension let the later row
(the variant) overwrite the parent, renaming it in the platform picker
and Folder Mappings page.
Prefer the canonical platform (fs_slug == slug) when building the map so
a variant folder no longer shadows its parent.
Fixes#3157
Generated-By: PostHog Code
Task-Id: 571866ea-86a0-49c2-b62e-dbea077d0181