fix: 修复更新器无法下载MAA的异常

This commit is contained in:
DLmaster
2025-04-13 16:46:54 +08:00
parent 4da4b7d552
commit 7e502420fa
8 changed files with 23 additions and 22 deletions

View File

@@ -241,7 +241,6 @@ class AUTO_MAA(MSFluentWindow):
# 清理临时更新器
if (Config.app_path / "AUTO_Updater.active.exe").exists():
try:
System.kill_process(Config.app_path / "AUTO_Updater.active.exe")
(Config.app_path / "AUTO_Updater.active.exe").unlink()
except Exception:
pass

View File

@@ -340,7 +340,7 @@ class MemberManager(QWidget):
for _ in range(3):
try:
response = requests.get(
"https://mirrorchyan.com/api/resources/MAA/latest?user_agent=MaaWpfGui&os=win&arch=x64&channel=stable"
"https://mirrorchyan.com/api/resources/MAA/latest?user_agent=AutoMaaGui&os=win&arch=x64&channel=stable"
)
maa_info = response.json()
break
@@ -372,7 +372,10 @@ class MemberManager(QWidget):
Path(folder),
"MAA",
maa_version,
{"thread_numb": Config.get(Config.update_ThreadNumb)},
{
"mode": "Proxy",
"thread_numb": Config.get(Config.update_ThreadNumb),
},
)
self.downloader.show()
self.downloader.run()

View File

@@ -271,7 +271,7 @@ class Setting(QWidget):
for _ in range(3):
try:
response = requests.get(
f"https://mirrorchyan.com/api/resources/AUTO_MAA/latest?current_version={version_text(current_version)}&cdk={Crypto.win_decryptor(Config.get(Config.update_MirrorChyanCDK))}&channel={Config.get(Config.update_UpdateType)}"
f"https://mirrorchyan.com/api/resources/AUTO_MAA/latest?user_agent=AutoMaaGui&current_version={version_text(current_version)}&cdk={Crypto.win_decryptor(Config.get(Config.update_MirrorChyanCDK))}&channel={Config.get(Config.update_UpdateType)}"
)
version_info: Dict[str, Union[int, str, Dict[str, str]]] = (
response.json()
@@ -404,8 +404,7 @@ class Setting(QWidget):
shell=True,
creationflags=subprocess.CREATE_NO_WINDOW,
)
self.close()
QApplication.quit()
self.window().close()
# 无版本更新
else: