mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 20:29:06 -05:00
feat: document the category of every entry
Held entries carry their category and readers too, not only missing ones, so each platform page says which cores read every file it lists and where the code does it. Severity still applies to firmware gaps only.
This commit is contained in:
1 parent
a75ea05b86
commit
be9036f2b2
3 files changed
+17
-16
No files matched your search
@@ -1993,14 +1993,14 @@ def _render_platform_systems(
|
||||
status_display = f"untested: {reason}" if reason else "untested"
|
||||
elif status == "missing":
|
||||
status_display = "**missing**"
|
||||
# Not every missing entry is firmware: the platform may list a
|
||||
# game's data or a file no core it runs opens.
|
||||
kind = {"game_data": "game data",
|
||||
"unread": "no core the platform runs opens it"}.get(f.get("category", ""))
|
||||
if kind:
|
||||
status_display += f", {kind}"
|
||||
else:
|
||||
status_display = status
|
||||
# Not every entry is firmware: the platform may list a game's data
|
||||
# or a file no core it runs opens.
|
||||
kind = {"game_data": "game data",
|
||||
"unread": "no core the platform runs opens it"}.get(f.get("category", ""))
|
||||
if kind:
|
||||
status_display += f", {kind}"
|
||||
|
||||
size_str = _fmt_size(size) if size else ""
|
||||
details = [status_display]
|
||||
@@ -2033,7 +2033,7 @@ def _render_platform_systems(
|
||||
if sha256:
|
||||
hash_parts.append(f"SHA256: `{sha256}`")
|
||||
lines.append(f"{pad} {' | '.join(hash_parts)}")
|
||||
if status == "missing" and f.get("category_evidence"):
|
||||
if f.get("category_evidence"):
|
||||
lines.append(f"{pad} {_category_evidence_md(f['category_evidence'])}")
|
||||
|
||||
lines.append("")
|
||||
|
||||
+9
-8
@@ -1192,8 +1192,8 @@ def verify_platform(
|
||||
file_status: dict[str, str] = {}
|
||||
file_required: dict[str, bool] = {}
|
||||
file_severity: dict[str, str] = {}
|
||||
# What a missing entry is: firmware, a game's data, or a name no core
|
||||
# the platform runs opens. Only firmware gaps carry a severity.
|
||||
# What each entry is: firmware, a game's data, or a name no core the
|
||||
# platform runs opens. Only firmware gaps carry a severity.
|
||||
file_category: dict[str, str] = {}
|
||||
categories = EntryCategories(config, profiles, data_dir_registry)
|
||||
|
||||
@@ -1356,13 +1356,14 @@ def verify_platform(
|
||||
prev = file_status.get(dest)
|
||||
hle = hle_index.get(file_entry.get("name", ""), False)
|
||||
sev = compute_severity(cur, required, mode, hle)
|
||||
if cur == Status.MISSING:
|
||||
explained = categories.explain(file_entry, destination, sys_id)
|
||||
category = explained.pop("category")
|
||||
result["category_evidence"] = explained
|
||||
else:
|
||||
category = BIOS
|
||||
explained = categories.explain(file_entry, destination, sys_id)
|
||||
category = explained.pop("category")
|
||||
result["category"] = category
|
||||
result["category_evidence"] = explained
|
||||
if cur != Status.MISSING:
|
||||
# A held entry is firmware for the counts: its category only
|
||||
# documents it.
|
||||
category = BIOS
|
||||
if file_category.get(dest, category) == BIOS:
|
||||
category = BIOS
|
||||
file_category[dest] = category
|
||||
|
||||
Reference in new issue
Block a user