mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
feat: add by_sha256 index, fix reporting attribution
generate_db: add by_sha256 index for O(1) variant lookup. verify: _find_best_variant uses indexed sha256 instead of O(n) scan. validation: check_file_validation returns (reason, emulators) tuple, attributing mismatch only to emulators whose check actually failed. beetle_psx: remove incorrect size field for ps1_rom.bin (code does not validate size, swanstation is sole size authority).
This commit is contained in:
@@ -1308,10 +1308,11 @@ def generate_pack(
|
||||
and validation_index
|
||||
):
|
||||
fname = file_entry.get("name", "")
|
||||
reason = check_file_validation(
|
||||
check = check_file_validation(
|
||||
local_path, fname, validation_index, bios_dir
|
||||
)
|
||||
if reason:
|
||||
if check:
|
||||
reason, emus_list = check
|
||||
better = _find_candidate_satisfying_both(
|
||||
file_entry,
|
||||
db,
|
||||
@@ -1322,8 +1323,7 @@ def generate_pack(
|
||||
if better:
|
||||
local_path = better
|
||||
else:
|
||||
ventry = validation_index.get(fname, {})
|
||||
emus = ", ".join(ventry.get("emulators", []))
|
||||
emus = ", ".join(emus_list)
|
||||
file_reasons.setdefault(
|
||||
dedup_key,
|
||||
f"{platform_display} says OK but {emus} says {reason}",
|
||||
|
||||
Reference in New Issue
Block a user