feat: MAA代理时更新改为强制开启
This commit is contained in:
@@ -359,10 +359,7 @@ class MaaConfig(LQConfig):
|
||||
"RunSet", "RoutineTimeLimit", 10, RangeValidator(1, 1024)
|
||||
)
|
||||
self.RunSet_AnnihilationWeeklyLimit = ConfigItem(
|
||||
"RunSet", "AnnihilationWeeklyLimit", False, BoolValidator()
|
||||
)
|
||||
self.RunSet_AutoUpdateMaa = ConfigItem(
|
||||
"RunSet", "AutoUpdateMaa", False, BoolValidator()
|
||||
"RunSet", "AnnihilationWeeklyLimit", True, BoolValidator()
|
||||
)
|
||||
|
||||
def get_name(self) -> str:
|
||||
|
||||
@@ -1228,23 +1228,6 @@ class MaaManager(QObject):
|
||||
else:
|
||||
self.update_log_text.emit("".join(self.maa_logs))
|
||||
|
||||
# 获取MAA版本号
|
||||
if not self.set["RunSet"]["AutoUpdateMaa"] and not self.maa_version:
|
||||
|
||||
section_match = re.search(r"={35}(.*?)={35}", log, re.DOTALL)
|
||||
if section_match:
|
||||
|
||||
version_match = re.search(
|
||||
r"Version\s+v(\d+\.\d+\.\d+(?:-\w+\.\d+)?)", section_match.group(1)
|
||||
)
|
||||
if version_match:
|
||||
self.maa_version = f"v{version_match.group(1)}"
|
||||
self.check_maa_version.emit(self.maa_version)
|
||||
logger.info(
|
||||
f"检测到MAA版本:{self.maa_version}",
|
||||
module=f"MAA调度器-{self.name}",
|
||||
)
|
||||
|
||||
if "自动代理" in self.log_check_mode:
|
||||
|
||||
# 获取最近一条日志的时间
|
||||
@@ -1509,9 +1492,9 @@ class MaaManager(QObject):
|
||||
data["Global"][
|
||||
"VersionUpdate.ScheduledUpdateCheck"
|
||||
] = "False" # 定时检查更新
|
||||
data["Global"]["VersionUpdate.AutoDownloadUpdatePackage"] = str(
|
||||
self.set["RunSet"]["AutoUpdateMaa"]
|
||||
) # 自动下载更新包
|
||||
data["Global"][
|
||||
"VersionUpdate.AutoDownloadUpdatePackage"
|
||||
] = "True" # 自动下载更新包
|
||||
data["Global"][
|
||||
"VersionUpdate.AutoInstallUpdatePackage"
|
||||
] = "False" # 自动安装更新包
|
||||
|
||||
@@ -913,14 +913,6 @@ class ScriptManager(QWidget):
|
||||
configItem=self.config.RunSet_AnnihilationWeeklyLimit,
|
||||
parent=self,
|
||||
)
|
||||
self.card_AutoUpdateMaa = SwitchSettingCard(
|
||||
icon=FluentIcon.PAGE_RIGHT,
|
||||
title="自动代理时自动更新MAA",
|
||||
content="执行自动代理任务时自动更新MAA,关闭后仍会进行MAA版本检查",
|
||||
qconfig=self.config,
|
||||
configItem=self.config.RunSet_AutoUpdateMaa,
|
||||
parent=self,
|
||||
)
|
||||
|
||||
widget = QWidget()
|
||||
Layout = QVBoxLayout(widget)
|
||||
@@ -931,7 +923,6 @@ class ScriptManager(QWidget):
|
||||
Layout.addWidget(self.card_AnnihilationTimeLimit)
|
||||
Layout.addWidget(self.card_RoutineTimeLimit)
|
||||
Layout.addWidget(self.card_AnnihilationWeeklyLimit)
|
||||
Layout.addWidget(self.card_AutoUpdateMaa)
|
||||
self.viewLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.viewLayout.setSpacing(0)
|
||||
self.addGroupWidget(widget)
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"4.4.1.5": {
|
||||
"程序优化": [
|
||||
"优化调度队列配置逻辑",
|
||||
"优化静默进程标记逻辑,避免未能及时移除导致相关功能持续开启"
|
||||
"优化静默进程标记逻辑,避免未能及时移除导致相关功能持续开启",
|
||||
"MAA 代理时更新改为强制开启"
|
||||
]
|
||||
},
|
||||
"4.4.1.4": {
|
||||
|
||||
Reference in New Issue
Block a user