mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-21 11:19:11 -05:00
feat: mark files a core finds by content
DuckStation identifies its BIOS by MD5 in a folder it scans (bios.cpp:208), so its entries' names are labels. The export wrote them into Batocera's and ROCKNIX's lists as files to hold: a user with only scph5501.bin read 104 missing BIOS where DuckStation boots. Labels also lent their md5 to a name another core opens, and paired by name they replaced System.dat's scph5000.bin hashes. found_by: name | content, on a profile or a file and keyed by build like load_from. The truth records which cores open each name (_named_by). A label pairs with a platform entry by hash only, is never added, merges with an opened name only on a shared hash, and is counted in the export report rather than listed as missing.
This commit is contained in:
1 parent
eaf6d1859d
commit
e5174a07bf
8 files changed
+182
-6
No files matched your search
@@ -512,6 +512,23 @@ def declaration_settles(
|
||||
return False
|
||||
|
||||
|
||||
def opens_by_name(file_entry: dict, profile: dict, standalone: bool = False) -> bool:
|
||||
"""Whether the code opens this entry by its name.
|
||||
|
||||
A core that scans a folder and identifies firmware by content
|
||||
(DuckStation by MD5, bios.cpp:208) gives its entries names that are
|
||||
labels. `found_by` says which, on the file or the profile, keyed by
|
||||
build when the two builds differ.
|
||||
"""
|
||||
for source in (file_entry, profile):
|
||||
value = source.get("found_by")
|
||||
if isinstance(value, dict):
|
||||
value = value.get("standalone" if standalone else "libretro")
|
||||
if value:
|
||||
return value != "content"
|
||||
return True
|
||||
|
||||
|
||||
def filter_files_by_mode(files: list[dict], standalone: bool) -> list[dict]:
|
||||
"""Filter file entries by libretro/standalone mode."""
|
||||
result = []
|
||||
|
||||
Reference in new issue
Block a user