修复: - 检查更新不再内置回退地址:只读取 config.json 的 update_url,未配置时检查更新直接失败并记录日志
This commit is contained in:
+2
-3
@@ -2472,11 +2472,10 @@ class MainWindow(QWidget):
|
|||||||
if _skip_update_check() and not manual:
|
if _skip_update_check() and not manual:
|
||||||
return # 设置跳过(仅自动检查):不检查也不打日志
|
return # 设置跳过(仅自动检查):不检查也不打日志
|
||||||
import json, urllib.request
|
import json, urllib.request
|
||||||
# 基于 Gitea 仓库 releases API 检查更新;config.json 无 update_url 时用默认地址
|
# 基于 Gitea 仓库 releases API 检查更新;地址只取 config.json 的 update_url
|
||||||
url = str(_config_val("update_url", "") or "").strip()
|
url = str(_config_val("update_url", "") or "").strip()
|
||||||
if not url:
|
if not url:
|
||||||
url = ("https://git.rrrosmontis.icu/api/v1/repos/RoyirinRosmontis/"
|
raise RuntimeError("config.json 未配置 update_url")
|
||||||
"Private-Proxy/releases/latest")
|
|
||||||
log("正在检查更新...")
|
log("正在检查更新...")
|
||||||
if _update_via_proxy():
|
if _update_via_proxy():
|
||||||
# 走节点隧道(CONNECT,设置「使用代理更新」开启时);显式代理避免残留干扰
|
# 走节点隧道(CONNECT,设置「使用代理更新」开启时);显式代理避免残留干扰
|
||||||
|
|||||||
Reference in New Issue
Block a user