feat(hub): add three image acquisition sources (official repo, custom repo, manual provided)
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m54s

This commit is contained in:
2026-10-04 01:31:38 +02:00
parent 6b2b39b080
commit 5456d50774
5 changed files with 93 additions and 36 deletions
+9 -4
View File
@@ -31,11 +31,16 @@ class ServerUpdateManager:
update_mode: str = "auto"
):
self.update_dir = update_dir or os.path.join(os.getcwd(), "updates")
os.makedirs(self.update_dir, exist_ok=True)
self.upstream_url = upstream_url or self.DEFAULT_GITEA_RELEASE_URL
self.check_enabled = check_enabled
self.auto_update_enabled = auto_update_enabled
self.update_mode = update_mode.lower() if update_mode else "auto"
raw_mode = (update_mode or "official").lower()
if raw_mode in ("official", "custom", "manual"):
self.update_mode = raw_mode
elif raw_mode == "auto":
self.update_mode = "official" if (not upstream_url or upstream_url == self.DEFAULT_GITEA_RELEASE_URL) else "custom"
else:
self.update_mode = "official"
# Cached upstream release state
self.last_checked_utc: Optional[str] = None
@@ -454,8 +459,8 @@ class ServerUpdateManager:
if self.server_update_available:
print(f"[!] 🔔 LOGAR Server Update Available: Current v{LOGAR_VERSION} -> Upstream v{upstream_ver}")
# Automatically download and cache client update packages on the Hub if in auto mode
should_auto_download = auto_download_clients and (self.update_mode == "auto" or force)
# Automatically download and cache client update packages on the Hub if in official or custom repo mode
should_auto_download = auto_download_clients and (self.update_mode in ("official", "custom", "auto") or force)
if should_auto_download and assets:
hosted = self.get_hosted_packages()
needs_win = not hosted.get("windows", {}).get("exists") or is_newer_version(upstream_ver, hosted.get("windows", {}).get("version", "0.0.0"))