mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 04:18:52 -06:00
refactor: share scraper and launcher helpers
BaseScraper reads JSON once (_fetch_json, json_object), every scraper files its requirements through systems_from_requirements, and the batocera-systems readers (Batocera, KNULLI, AmberELEC, EmuELEC) inherit CheckBiosScraper. Launcher modules share one Launcher record, one LauncherPatternMissing and one link_record. DAT importers build provenance entries from LogiqxDat.
This commit is contained in:
1 parent
ac16875c5b
commit
7cd499531d
27 files changed
+256
-360
No files matched your search
@@ -39,6 +39,21 @@ class LogiqxDat:
|
||||
version: str = ""
|
||||
roms: list[LogiqxRom] = field(default_factory=list)
|
||||
|
||||
def provenance_entries(self, roms: list[LogiqxRom] | None = None) -> list[dict]:
|
||||
"""The provenance snapshot form of the ROMs given, all of them by default."""
|
||||
return [
|
||||
{
|
||||
"dat": self.name,
|
||||
"name": rom.name,
|
||||
"description": rom.description,
|
||||
"size": rom.size,
|
||||
"crc32": rom.crc32,
|
||||
"md5": rom.md5,
|
||||
"sha1": rom.sha1,
|
||||
}
|
||||
for rom in (self.roms if roms is None else roms)
|
||||
]
|
||||
|
||||
|
||||
def parse_logiqx(content: str | bytes) -> LogiqxDat:
|
||||
"""Parse Logiqx XML DAT content.
|
||||
|
||||
Reference in new issue
Block a user