mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-13 21:43:55 -06:00
feat: read retrobat bios groups
emulatorLauncher 228731e0 lists ten PS2 BIOS in one group: one held file is enough and Program.cs reports the others OPTIONAL. The scraper keeps group and optional, verify and the pack check apply the same rule.
This commit is contained in:
1 parent
14e85924b0
commit
77a8f171ba
6 files changed
+85
-1
No files matched your search
@@ -774,6 +774,14 @@ def verify_pack_against_platform(
|
||||
baseline_groups.setdefault(expected, []).append(fe)
|
||||
|
||||
baseline_checked = len(baseline_groups)
|
||||
# RetroBat's group: one packed file of it is enough, as verify counts it.
|
||||
packed_groups = {
|
||||
(system_of[id(fe)], fe["group"])
|
||||
for expected, declarations in baseline_groups.items()
|
||||
if expected in zip_set or expected.lower() in zip_lower
|
||||
for fe in declarations
|
||||
if fe.get("group")
|
||||
}
|
||||
exclusion_index = build_zip_contents_index(db) if db is not None else {}
|
||||
categories = EntryCategories(config, emu_profiles, data_registry)
|
||||
for expected, declarations in baseline_groups.items():
|
||||
@@ -795,6 +803,12 @@ def verify_pack_against_platform(
|
||||
):
|
||||
baseline_excluded += 1
|
||||
continue
|
||||
elif all(
|
||||
fe.get("group") and (system_of[id(fe)], fe["group"]) in packed_groups
|
||||
for fe in declarations
|
||||
):
|
||||
baseline_absent += 1
|
||||
continue
|
||||
elif db is not None and all(
|
||||
categories.category(fe, fe.get("destination", fe.get("name", "")),
|
||||
system_of[id(fe)]) != BIOS
|
||||
|
||||
@@ -217,6 +217,9 @@ class Scraper(BaseScraper):
|
||||
sys_name = sys_data.get("name", "") if isinstance(sys_data, dict) else ""
|
||||
if sys_name:
|
||||
native["native_name"] = sys_name
|
||||
# One held file of a group is enough (Program.cs): verify reads it.
|
||||
if bios.get("group"):
|
||||
native["group"] = str(bios["group"])
|
||||
|
||||
requirements.append(
|
||||
BiosRequirement(
|
||||
@@ -224,7 +227,7 @@ class Scraper(BaseScraper):
|
||||
system=SYSTEM_SLUG_MAP.get(sys_key, sys_key),
|
||||
md5=md5 or None,
|
||||
destination=file_path,
|
||||
required=True,
|
||||
required=not bios.get("optional", False),
|
||||
native_id=sys_key,
|
||||
native_path=declared_path,
|
||||
native=native,
|
||||
|
||||
@@ -1424,6 +1424,25 @@ def verify_platform(
|
||||
):
|
||||
file_severity[dest] = sev
|
||||
|
||||
# RetroBat's group: one file of it held is enough, and the others are
|
||||
# reported OPTIONAL (batocera-systems/Program.cs). None held, each stays
|
||||
# required.
|
||||
members: dict[tuple[str, str], list[str]] = {}
|
||||
for sys_id, system in config.get("systems", {}).items():
|
||||
for file_entry in system.get("files", []):
|
||||
if file_entry.get("group"):
|
||||
dest = _dest_key(file_entry, sys_id)
|
||||
if dest in file_status:
|
||||
members.setdefault((sys_id, file_entry["group"]), []).append(dest)
|
||||
for dests in members.values():
|
||||
if any(file_status[d] == Status.OK for d in dests):
|
||||
for dest in dests:
|
||||
if file_status[dest] == Status.MISSING:
|
||||
file_required[dest] = False
|
||||
file_severity[dest] = compute_severity(Status.MISSING, False, mode)
|
||||
for result in results_at.get(dest, []):
|
||||
result["required"] = False
|
||||
|
||||
shipped, occupied = _builder_placement(
|
||||
packed_order, bool(config.get("case_insensitive_fs", False))
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user