refactor: move es_systems readers out of batocera

es_systems.yml readers move to scraper/es_systems.py, which the board
target scraper imports at load time instead of inside a function to dodge
the cycle. The _default.remove_cores list is target override data: it is
model.targets.not_cores, no longer a private name of batocera_scraper.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 16:43:46 +01:00
1 parent 14cc76132f
commit e6295aba88
12 files changed
+174 -167

No files matched your search

+4 -4
View File
@@ -32,6 +32,7 @@ from __future__ import annotations
import re
from model.targets import not_cores
from .amberelec_launchers import extract_launchers
from .base_scraper import fetch_text, github_json
from .batocera_scraper import (
@@ -39,7 +40,6 @@ from .batocera_scraper import (
)
from .batocera_scraper import (
CheckBiosScraper,
_not_cores,
)
from .es_emulators import attach_system_cores, es_cores, system_cores, xml_systems
@@ -114,9 +114,9 @@ class Scraper(CheckBiosScraper):
# es_systems.cfg gives each <system> its <emulators> in menu order
# (atarist, lines 267-288: retroarch's hatari, then HATARISA).
es_systems = xml_systems(fetch_text(ES_SYSTEMS_TEMPLATE.format(ref=self.commit)))
not_cores = _not_cores(PLATFORM_NAME)
cores, standalone, dual = es_cores(es_systems, RUNNERS, BUILDS_OF, not_cores)
attach_system_cores(systems, system_cores(es_systems, RUNNERS, not_cores))
dropped = not_cores(PLATFORM_NAME)
cores, standalone, dual = es_cores(es_systems, RUNNERS, BUILDS_OF, dropped)
attach_system_cores(systems, system_cores(es_systems, RUNNERS, dropped))
return {
"platform": "AmberELEC",
"version": self.tag,