fix: place install commands where systems link

system_install_choices and the emulator card's maker read the folder
votes of sitegen.places while every system link read system_section:
Game Boy Color's commands sat under Game Boy, Super A'Can's under
Arcade. Both now read system_section, after the boards are recorded,
and a test checks every command against its system's link.
This commit is contained in:
Abdessamad Derraz committed 2026-11-23 21:44:08 +01:00
1 parent 2971219571
commit 74924be233
9 files changed
+69 -104

No files matched your search

+4 -2
View File
@@ -17,7 +17,7 @@ from sitegen.descriptions import EMULATOR_SNIPPETS, NOTHING_TO_FETCH, PAGE_DATA,
from sitegen.emulatorcards import snippet_noun
from sitegen.install import comes_with_app
from sitegen.lookup import data_member_digests, hash_pairs
from sitegen.render import card_anchor, system_page_map
from sitegen.render import card_anchor, system_section
from sitegen.write import write_if_changed
@@ -302,7 +302,9 @@ def record_emulator_page(name: str, profile: dict) -> None:
fetched = [f for f in listed if f.get("name") and not comes_with_app(f)]
systems = profile.get("systems") or []
first = systems[0] if systems else ""
makers = [system_page_map[sys_id][0] for sys_id in systems if sys_id in system_page_map]
# The maker of the section each system links to, as the system pages
# place it.
makers = [section[0] for section in (system_section(str(sid)) for sid in systems) if section]
if makers:
sitestarlight.EMULATOR_CARDS[f"emulators/{name}"] = makers[0]
else: