v1.0.13.1 — pack download stability, proxy for MC/Forge downloads, build.version priority
This commit is contained in:
+7
-5
@@ -1261,15 +1261,17 @@ async def get_pack_file(pack_name: str, file_path: str, request: Request, curren
|
||||
# ====================== ЭНДПОИНТЫ ДЛЯ ЛАУНЧЕРА ======================
|
||||
|
||||
def get_current_launcher_version() -> str:
|
||||
"""Get current launcher version from meta system (new format) or build.version (legacy)"""
|
||||
"""Get current launcher version — prefers build.version (includes hotfix), falls back to extracted versions"""
|
||||
version_file = BUILDS_DIR / "build.version"
|
||||
if version_file.exists():
|
||||
v = version_file.read_text().strip()
|
||||
if v:
|
||||
return v
|
||||
|
||||
versions = get_launcher_versions()
|
||||
if versions:
|
||||
return versions[0]["meta"]["version"]
|
||||
|
||||
# Fallback to build.version for legacy
|
||||
version_file = BUILDS_DIR / "build.version"
|
||||
if version_file.exists():
|
||||
return version_file.read_text().strip()
|
||||
return "1.0.0"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user