mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-19 18:03:10 -05:00
fix: name the corrections an export withholds
This commit is contained in:
1 parent
2173db889b
commit
76d3c987d4
4 files changed
+30
No files matched your search
@@ -433,7 +433,11 @@ def export_platform(
|
||||
summary += f", {refused} the format cannot state"
|
||||
if lost:
|
||||
summary += f", {lost} of theirs dropped"
|
||||
withheld = exporter.withheld()
|
||||
if withheld:
|
||||
summary += f", {len(withheld)} corrections withheld"
|
||||
messages.append(summary)
|
||||
messages.extend(f"withheld: {reason}" for reason in withheld)
|
||||
for correction in applied[:5]:
|
||||
messages.append(f"hash corrected: {correction}")
|
||||
if len(applied) > 5:
|
||||
|
||||
@@ -179,6 +179,14 @@ class BaseExporter(ABC):
|
||||
"""
|
||||
return field_name in self.carries()
|
||||
|
||||
def withheld(self) -> list[str]:
|
||||
"""Corrections the render proved and still did not write, named.
|
||||
|
||||
Empty for most formats. One that refuses a rewrite to keep a value
|
||||
the platform holds says so here, or the run reads as nothing to do.
|
||||
"""
|
||||
return []
|
||||
|
||||
def outcome(
|
||||
self,
|
||||
systems: dict[str, NativeSystem],
|
||||
|
||||
@@ -103,6 +103,14 @@ class Exporter(BaseExporter):
|
||||
return []
|
||||
return self._md5s(systems, system_id)
|
||||
|
||||
def withheld(self) -> list[str]:
|
||||
"""Each check whose rewrite was refused, and the md5 that kept it."""
|
||||
return [
|
||||
f"{name} keeps EmuDeck's array: rewriting it would drop "
|
||||
f"{', '.join(sorted(values))}, which no profile carries"
|
||||
for name, values in sorted(getattr(self, "_withdrawn", {}).items())
|
||||
]
|
||||
|
||||
def _refused_systems(self) -> set[str]:
|
||||
withdrawn = getattr(self, "_withdrawn", {})
|
||||
return {FUNCTION_HASH_MAP[name] for name in withdrawn if name in FUNCTION_HASH_MAP}
|
||||
|
||||
Reference in new issue
Block a user