Merge branch 'DLMS_dev' into dev

This commit is contained in:
DLmaster361
2025-04-15 22:34:52 +08:00
10 changed files with 208 additions and 141 deletions

View File

@@ -202,7 +202,8 @@ class Home(QWidget):
for _ in range(3):
try:
response = requests.get(
"https://gitee.com/DLmaster_361/AUTO_MAA/raw/server/theme_image.json"
"https://gitee.com/DLmaster_361/AUTO_MAA/raw/server/theme_image.json",
timeout=10,
)
theme_image = response.json()
break
@@ -238,7 +239,7 @@ class Home(QWidget):
> time_local
):
response = requests.get(theme_image["url"])
response = requests.get(theme_image["url"], timeout=10)
if response.status_code == 200:
with open(

View File

@@ -340,7 +340,8 @@ class MemberManager(QWidget):
for _ in range(3):
try:
response = requests.get(
"https://mirrorchyan.com/api/resources/MAA/latest?user_agent=AutoMaaGui&os=win&arch=x64&channel=stable"
"https://mirrorchyan.com/api/resources/MAA/latest?user_agent=AutoMaaGui&os=win&arch=x64&channel=stable",
timeout=10,
)
maa_info = response.json()
break
@@ -611,7 +612,7 @@ class MemberManager(QWidget):
self.card_TaskTransitionMethod = ComboBoxSettingCard(
icon=FluentIcon.PAGE_RIGHT,
title="任务切换方式",
content="简洁用户列表下相邻两个任务间的切换方式",
content="相邻两个任务间的切换方式,使用“详细”配置的用户固定为“重启模拟器”",
texts=["直接切换账号", "重启明日方舟", "重启模拟器"],
qconfig=self.config,
configItem=self.config.RunSet_TaskTransitionMethod,
@@ -620,7 +621,7 @@ class MemberManager(QWidget):
self.card_EnhanceTask = ComboBoxSettingCard(
icon=FluentIcon.PAGE_RIGHT,
title="自动代理增效任务",
content="自动代理时的额外操作,此操作无法区分多开,可能会干扰其他任务,也可能关闭您正在使用的模拟器",
content="自动代理时的额外操作,此操作无法区分多开模拟器,可能会干扰其他任务,也可能关闭您正在使用的模拟器",
texts=[
"禁用",
"强制关闭ADB",
@@ -634,7 +635,7 @@ class MemberManager(QWidget):
self.ProxyTimesLimit = SpinBoxSettingCard(
icon=FluentIcon.PAGE_RIGHT,
title="用户单日代理次数上限",
content="当用户本日代理成功次数超过该阈值时跳过代理阈值为“0”时视为无代理次数上限",
content="当用户本日代理成功次数达到该阈值时跳过代理阈值为“0”时视为无代理次数上限",
range=(0, 1024),
qconfig=self.config,
configItem=self.config.RunSet_ProxyTimesLimit,

View File

@@ -421,7 +421,7 @@ class QueueManager(QWidget):
self.card_Enable = SwitchSettingCard(
icon=FluentIcon.HOME,
title="状态",
content="调度队列状态",
content="调度队列状态,仅启用时会执行定时任务",
qconfig=self.config,
configItem=self.config.queueSet_Enabled,
parent=self,

View File

@@ -51,6 +51,7 @@ import shutil
import requests
import subprocess
from datetime import datetime
from packaging import version
from pathlib import Path
from typing import Dict, List, Union
@@ -271,7 +272,8 @@ class Setting(QWidget):
for _ in range(3):
try:
response = requests.get(
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)}"
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)}",
timeout=10,
)
version_info: Dict[str, Union[int, str, Dict[str, str]]] = (
response.json()
@@ -336,7 +338,9 @@ class Setting(QWidget):
)
# 有版本更新
if remote_version > current_version:
if version.parse(version_text(remote_version)) > version.parse(
version_text(current_version)
):
version_info_json: Dict[str, Dict[str, str]] = json.loads(
re.sub(
@@ -353,9 +357,11 @@ class Setting(QWidget):
all_version_info = {}
for v_i in [
info
for version, info in version_info_json.items()
if list(map(int, version.split("."))) > current_version
for ver, info in version_info_json.items()
if version.parse(version_text(list(map(int, ver.split(".")))))
> version.parse(version_text(current_version))
]:
for key, value in v_i.items():
if key in update_version_info:
update_version_info[key] += value.copy()
@@ -400,8 +406,7 @@ class Setting(QWidget):
return None
subprocess.Popen(
str(Config.app_path / "AUTO_Updater.active.exe"),
shell=True,
[Config.app_path / "AUTO_Updater.active.exe"],
creationflags=subprocess.CREATE_NO_WINDOW,
)
self.window().close()
@@ -417,7 +422,8 @@ class Setting(QWidget):
for _ in range(3):
try:
response = requests.get(
"https://gitee.com/DLmaster_361/AUTO_MAA/raw/server/notice.json"
"https://gitee.com/DLmaster_361/AUTO_MAA/raw/server/notice.json",
timeout=10,
)
notice = response.json()
break