mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
fix: keep fbneo per-rom refs and archive names
This commit is contained in:
1 parent
47182f4cb1
commit
77dff6377e
4 files changed
+30
-4
No files matched your search
@@ -266,6 +266,11 @@ def _diff_fbneo(
|
||||
continue
|
||||
|
||||
old = existing_by_key[key]
|
||||
# source_ref is deliberately not compared here. The scraper knows
|
||||
# one line per driver, the struct, while a curated entry cites the
|
||||
# RomDesc line of its own ROM. Treating the difference as drift
|
||||
# would replace per-ROM precision with a single driver line, which
|
||||
# the profiling rules call the signature of a faulty entry.
|
||||
if old.get("crc32") != rom.get("crc32") or old.get("size") != rom.get(
|
||||
"size"
|
||||
):
|
||||
|
||||
@@ -279,9 +279,15 @@ def run(
|
||||
diff = compute_diff(str(path), str(CACHE_PATH), mode="fbneo")
|
||||
print(_format_diff(path.stem, diff, show_added=is_main))
|
||||
|
||||
effective_added = diff["added"] if is_main else []
|
||||
if not dry_run and (effective_added or diff["updated"]):
|
||||
merge_fbneo_profile(str(path), str(CACHE_PATH), write=True, add_new=is_main)
|
||||
# New entries are never written. A non-arcade FBNeo driver opens an
|
||||
# archive whose name has the system prefix stripped by its own
|
||||
# GetZipName (cv_coleco -> coleco.zip, gba_gba -> gba.zip), and the
|
||||
# parser reads the driver struct name instead. Adding those would
|
||||
# create phantom archives the core never opens, next to the correctly
|
||||
# named entries already curated. Refreshing existing entries is safe:
|
||||
# they are keyed by the archive name the profile already declares.
|
||||
if not dry_run and diff["updated"]:
|
||||
merge_fbneo_profile(str(path), str(CACHE_PATH), write=True, add_new=False)
|
||||
log.info("merged changes into %s", path.name)
|
||||
|
||||
return 0
|
||||
|
||||
Reference in new issue
Block a user