mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
fix: skip entries without md5 in batocera and retrobat exports
This commit is contained in:
@@ -71,11 +71,12 @@ class Exporter(BaseExporter):
|
||||
if not md5:
|
||||
md5 = scraped_md5.get(name.lower(), "")
|
||||
|
||||
entry_parts = []
|
||||
if md5:
|
||||
entry_parts.append(f'"md5": "{md5}"')
|
||||
entry_parts.append(f'"file": "bios/{dest}"')
|
||||
bios_parts.append("{ " + ", ".join(entry_parts) + " }")
|
||||
# Original format requires md5 for every entry — skip without
|
||||
if not md5:
|
||||
continue
|
||||
bios_parts.append(
|
||||
f'{{ "md5": "{md5}", "file": "bios/{dest}" }}'
|
||||
)
|
||||
|
||||
bios_str = ", ".join(bios_parts)
|
||||
line = (
|
||||
@@ -98,6 +99,12 @@ class Exporter(BaseExporter):
|
||||
name = fe.get("name", "")
|
||||
if name.startswith("_") or self._is_pattern(name):
|
||||
continue
|
||||
# Skip entries without md5 (not exportable in this format)
|
||||
md5 = fe.get("md5", "")
|
||||
if isinstance(md5, list):
|
||||
md5 = md5[0] if md5 else ""
|
||||
if not md5:
|
||||
continue
|
||||
dest = self._dest(fe)
|
||||
if dest not in content and name not in content:
|
||||
issues.append(f"missing: {name}")
|
||||
|
||||
@@ -60,9 +60,10 @@ class Exporter(BaseExporter):
|
||||
if isinstance(md5, list):
|
||||
md5 = md5[0] if md5 else ""
|
||||
|
||||
# Original format has md5 before file
|
||||
# Original format requires md5 for every entry
|
||||
if not md5:
|
||||
continue
|
||||
entry: OrderedDict[str, str] = OrderedDict()
|
||||
if md5:
|
||||
entry["md5"] = md5
|
||||
entry["file"] = f"bios/{dest}"
|
||||
bios_files.append(entry)
|
||||
@@ -102,6 +103,11 @@ class Exporter(BaseExporter):
|
||||
name = fe.get("name", "")
|
||||
if name.startswith("_") or self._is_pattern(name):
|
||||
continue
|
||||
md5 = fe.get("md5", "")
|
||||
if isinstance(md5, list):
|
||||
md5 = md5[0] if md5 else ""
|
||||
if not md5:
|
||||
continue
|
||||
dest = self._dest(fe)
|
||||
if name not in exported_files and dest not in exported_files:
|
||||
issues.append(f"missing: {name}")
|
||||
|
||||
Reference in New Issue
Block a user