mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-30 05:18:51 -06:00
refactor: read declared hashes with one helper
core.hashing.declared_hash_lists gives an entry's declared values per field in the order written, and declared_hashes builds its sets on it. The gap page, the doubled-destination report and the file lookup used their own copies of that reader. The wanted page keeps its filters on top of it. sitegen.lookup.hash_pairs replaces sorted_hash_values for the lookup, the data exports and the structured data. The one-field aliases parse_md5_list and reconcile.hash_values are gone, and model.profiles reads HASH_FIELDS instead of a fourth tuple.
This commit is contained in:
1 parent
ea68e85c06
commit
02969dda06
30 files changed
+176
-195
No files matched your search
@@ -15,7 +15,7 @@ try:
|
||||
except ImportError:
|
||||
yaml = None
|
||||
|
||||
from core.hashing import compute_hashes, parse_hash_list, parse_md5_list, stream_hashes
|
||||
from core.hashing import compute_hashes, parse_hash_list, stream_hashes
|
||||
from model.nodedup import in_nodedup_dir
|
||||
from model.platforms import load_platform_config
|
||||
from model.profiles import load_emulator_profiles
|
||||
@@ -179,7 +179,7 @@ def load_platform_hashes(platforms_dir: str, db: dict | None = None) -> dict:
|
||||
for system_id, system in config.get("systems", {}).items():
|
||||
for file_entry in system.get("files", []):
|
||||
sha1s = parse_hash_list(file_entry.get("sha1"))
|
||||
md5s = parse_md5_list(file_entry.get("md5"))
|
||||
md5s = parse_hash_list(file_entry.get("md5"))
|
||||
sha256s = parse_hash_list(file_entry.get("sha256"))
|
||||
known["sha1"].update(sha1s)
|
||||
known["md5"].update(md5s)
|
||||
|
||||
Reference in new issue
Block a user