feat: add 47 missing cores to batocera platform config

This commit is contained in:
Abdessamad Derraz
2026-03-30 07:09:52 +02:00
parent b587381f05
commit 7b484605d4
3 changed files with 295 additions and 242 deletions

View File

@@ -38,8 +38,14 @@ def _enrich_hashes(entry: dict, db: dict) -> None:
sha1 = entry.get("sha1", "")
md5 = entry.get("md5", "")
# Hashes can be lists (multi-hash) — use first string value
if isinstance(sha1, list):
sha1 = sha1[0] if sha1 else ""
if isinstance(md5, list):
md5 = md5[0] if md5 else ""
record = None
if sha1 and db.get("files"):
if sha1 and isinstance(sha1, str) and db.get("files"):
record = db["files"].get(sha1)
if record is None and md5:
by_md5 = db.get("by_md5", {})