refactor: walk gitlab trees in one place

core.upstream.gitlab_tree_entries serves _gitlab_tree, list_gitlinks
and the romfolders listing. The Recalbox systems listing becomes
Scraper.system_folders, so the targets scraper gets the page cap and
refuses an empty listing instead of writing boards without cores.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 06:00:53 +01:00
1 parent 8bc497cf15
commit 39e6d57fcb
5 files changed
+92 -80

No files matched your search

@@ -21,7 +21,7 @@ from datetime import datetime, timezone
from . import BaseTargetScraper, target_cli
from ..base_scraper import fetch_bytes, fetch_text
from ..recalbox_scraper import SYSTEMS_TREE_URL, Scraper as PlatformScraper, board_cores
from ..recalbox_scraper import Scraper as PlatformScraper, board_cores
PLATFORM_NAME = "recalbox"
@@ -66,16 +66,7 @@ class Scraper(BaseTargetScraper):
if not boards:
raise RuntimeError(f"no recalbox-*_defconfig in configs/ at {tag}")
systems: list[str] = []
page = 1
while True:
entries = json.loads(fetch_bytes(SYSTEMS_TREE_URL.format(tag=tag, page=page)))
systems += [e["name"] for e in entries
if e.get("type") == "tree" and not e["name"].startswith(".")]
if len(entries) < 100:
break
page += 1
inis = platform._system_inis(systems)
inis = platform._system_inis(platform.system_folders())
targets: dict[str, dict] = {}
for board, name in sorted(boards.items()):