mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
feat: batocera 679/680, fix variant indexing, add hikaru + segaboot
Fix variant name indexing: files in .variants/ now indexed under canonical name (naomi2.zip instead of naomi2.zip.da79eca4). Fix .zip detection for variant paths in verify.py. Add composite MD5 matching in resolver for ZIP variants. Add hikaru.zip (MAME 0.285, 6 ROMs) and segaboot.gcm (Triforce) from archive.org. Both match Batocera expected MD5s. Batocera 679/680 (1 untested: sc3000 private dump) Recalbox 346/346 (100%)
This commit is contained in:
@@ -127,6 +127,14 @@ def resolve_to_local_path(file_entry: dict, db: dict) -> str | None:
|
||||
for path, db_md5 in candidates:
|
||||
if db_md5.lower() == md5_lower:
|
||||
return path
|
||||
# Try composite MD5 for ZIP files (Recalbox uses Zip::Md5Composite)
|
||||
for path, _ in candidates:
|
||||
if ".zip" in os.path.basename(path):
|
||||
try:
|
||||
if md5_composite(path).lower() == md5_lower:
|
||||
return path
|
||||
except (zipfile.BadZipFile, OSError):
|
||||
pass
|
||||
if candidates:
|
||||
primary = [p for p, _ in candidates if "/.variants/" not in p]
|
||||
return primary[0] if primary else candidates[0][0]
|
||||
@@ -194,7 +202,7 @@ def verify_entry_md5(file_entry: dict, local_path: str | None) -> dict:
|
||||
|
||||
# Recalbox uses Zip::Md5Composite() for ZIP files: sorts filenames,
|
||||
# hashes all contents sequentially. Independent of compression level.
|
||||
if local_path.endswith(".zip"):
|
||||
if ".zip" in os.path.basename(local_path):
|
||||
try:
|
||||
composite = md5_composite(local_path)
|
||||
composite_lower = composite.lower()
|
||||
|
||||
Reference in New Issue
Block a user