mirror of
https://github.com/Abdess/retrobios.git
synced 2026-06-24 20:12:49 +00:00
fix: preserve batocera version when github fetch fails
This commit is contained in:
parent
903c49edcf
commit
1f073f521d
2 changed files with 8 additions and 1 deletions
|
|
@ -329,6 +329,13 @@ class Scraper(BaseScraper):
|
|||
num = tag.removeprefix("batocera-")
|
||||
if num.isdigit():
|
||||
batocera_version = num
|
||||
if not batocera_version:
|
||||
# Preserve existing version when fetch fails (offline mode)
|
||||
existing = Path(__file__).resolve().parents[2] / "platforms" / "batocera.yml"
|
||||
if existing.exists():
|
||||
with open(existing) as f:
|
||||
old = yaml.safe_load(f) or {}
|
||||
batocera_version = str(old.get("version", ""))
|
||||
|
||||
cores, standalone = self._fetch_cores()
|
||||
result = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue