mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
fix: preserve batocera version when github fetch fails
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
platform: Batocera
|
||||
version: ''
|
||||
version: '42'
|
||||
homepage: https://batocera.org
|
||||
source: https://raw.githubusercontent.com/batocera-linux/batocera.linux/master/package/batocera/core/batocera-scripts/scripts/batocera-systems
|
||||
base_destination: bios
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user