chore: merge site and docs batch

This commit is contained in:
Abdessamad Derraz committed 2026-11-05 22:22:37 +01:00
commit 0350f42351
40 files changed
+1305 -222

No files matched your search

+16 -6
View File
@@ -27,6 +27,7 @@ from common import (
platform_arg,
ProfileSelectionError,
_norm_system_id,
archive_entry,
directory_members,
expand_directory_entries,
get_mame_clone_map,
@@ -573,18 +574,27 @@ class FileConsumers:
for dest, sha1 in members.items()
]
else:
# The archive members the profile reads decide between
# same-named copies, as in the emulator pack and verify.
found = [self.sha1_of(
with_archive_members(entry, files), entry.get("path") or "",
owner=name,
)]
found = [self.sha1_of(*entry_target(entry, files), owner=name)]
for sha1 in found:
if sha1:
self.emulators.setdefault(sha1, set()).add(name)
self.emulator_entries.setdefault(sha1, {}).setdefault(name, index)
def entry_target(entry: dict, files: list[dict]) -> tuple[dict, str]:
"""The entry a profile entry resolves through, and its destination.
A ROM read inside an archive is the archive: FBNeo opens sm1.sm1 in
neogeo.zip, and resolved by its crc32 it credited a loose copy FBNeo
never opens, while no neogeo.zip card named FBNeo. The archive
members the profile reads decide between same-named copies, as in
the emulator pack and verify.
"""
if entry.get("archive"):
return archive_entry(entry["archive"], files), ""
return with_archive_members(entry, files), entry.get("path") or ""
def entry_source(f: dict, index: dict) -> str | None:
"""Where the collection holds a profile entry, or None.