mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-27 11:58:53 -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
@@ -48,6 +48,7 @@ from .base_scraper import (
|
||||
fetch_bytes,
|
||||
fetch_github_latest_version,
|
||||
github_headers,
|
||||
json_object,
|
||||
requirement_entry,
|
||||
)
|
||||
from .retrodeck_launchers import extract_launchers
|
||||
@@ -506,10 +507,7 @@ class Scraper(BaseScraper):
|
||||
return text
|
||||
|
||||
def validate_format(self, raw_data: str) -> bool:
|
||||
try:
|
||||
return isinstance(json.loads(raw_data), dict)
|
||||
except (json.JSONDecodeError, TypeError):
|
||||
return False
|
||||
return json_object(raw_data) is not None
|
||||
|
||||
def fetch_requirements(self) -> list[BiosRequirement]:
|
||||
manifests = self._get_manifests()
|
||||
|
||||
Reference in new issue
Block a user