diff --git a/app/__init__.py b/app/__init__.py index a07fab1..348605b 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -29,9 +29,9 @@ __version__ = "4.2.0" __author__ = "DLmaster361 " __license__ = "GPL-3.0 license" -from .core import AppConfig, QueueConfig, MaaConfig, Task, TaskManager, MainTimer +from .core import AppConfig, QueueConfig, MaaConfig, Task, Task_manager, Main_timer from .models import MaaManager -from .services import Notification, CryptoHandler, SystemHandler +from .services import Notify, Crypto, System from .ui import AUTO_MAA from .utils import Updater, version_text @@ -40,12 +40,12 @@ __all__ = [ "QueueConfig", "MaaConfig", "Task", - "TaskManager", - "MainTimer", + "Task_manager", + "Main_timer", "MaaManager", - "Notification", - "CryptoHandler", - "SystemHandler", + "Notify", + "Crypto", + "System", "AUTO_MAA", "Updater", "version_text", diff --git a/app/__pycache__/__init__.cpython-312.pyc b/app/__pycache__/__init__.cpython-312.pyc index 6f92029..e8ee898 100644 Binary files a/app/__pycache__/__init__.cpython-312.pyc and b/app/__pycache__/__init__.cpython-312.pyc differ diff --git a/app/core/__init__.py b/app/core/__init__.py index ae97862..8990b48 100644 --- a/app/core/__init__.py +++ b/app/core/__init__.py @@ -29,17 +29,18 @@ __version__ = "4.2.0" __author__ = "DLmaster361 " __license__ = "GPL-3.0 license" -from .config import AppConfig, QueueConfig, MaaConfig +from .config import AppConfig, QueueConfig, MaaConfig, Config from .main_info_bar import MainInfoBar -from .task_manager import Task, TaskManager -from .timer import MainTimer +from .task_manager import Task, Task_manager +from .timer import Main_timer __all__ = [ "AppConfig", + "Config", "QueueConfig", "MaaConfig", "MainInfoBar", "Task", - "TaskManager", - "MainTimer", + "Task_manager", + "Main_timer", ] diff --git a/app/core/__pycache__/__init__.cpython-312.pyc b/app/core/__pycache__/__init__.cpython-312.pyc index b73b8f0..45dc4c8 100644 Binary files a/app/core/__pycache__/__init__.cpython-312.pyc and b/app/core/__pycache__/__init__.cpython-312.pyc differ diff --git a/app/core/__pycache__/config.cpython-312.pyc b/app/core/__pycache__/config.cpython-312.pyc index 85036e4..90ea41b 100644 Binary files a/app/core/__pycache__/config.cpython-312.pyc and b/app/core/__pycache__/config.cpython-312.pyc differ diff --git a/app/core/__pycache__/task_manager.cpython-312.pyc b/app/core/__pycache__/task_manager.cpython-312.pyc index 5e15c72..0594510 100644 Binary files a/app/core/__pycache__/task_manager.cpython-312.pyc and b/app/core/__pycache__/task_manager.cpython-312.pyc differ diff --git a/app/core/__pycache__/timer.cpython-312.pyc b/app/core/__pycache__/timer.cpython-312.pyc index 98994b9..c448c0a 100644 Binary files a/app/core/__pycache__/timer.cpython-312.pyc and b/app/core/__pycache__/timer.cpython-312.pyc differ diff --git a/app/core/config.py b/app/core/config.py index 123356a..5e699a9 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -84,7 +84,7 @@ class AppConfig: "updater_version": "0.0.0.0", } with self.version_path.open(mode="w", encoding="utf-8") as f: - json.dump(version, f, indent=4) + json.dump(version, f, ensure_ascii=False, indent=4) # 生成预设gameid替换方案文件 if not self.gameid_path.exists(): @@ -253,7 +253,7 @@ class AppConfig: history = json.load(f) history[key] = content with self.history_path.open(mode="w", encoding="utf-8") as f: - json.dump(history, f, indent=4) + json.dump(history, f, ensure_ascii=False, indent=4) def get_history(self, key: str) -> dict: """获取历史记录""" @@ -409,3 +409,6 @@ class MaaConfig(QConfig): RunSet_RunTimesLimit = RangeConfigItem( "RunSet", "RunTimesLimit", 3, RangeValidator(1, 1024) ) + + +Config = AppConfig() diff --git a/app/core/task_manager.py b/app/core/task_manager.py index 452df8c..57c979d 100644 --- a/app/core/task_manager.py +++ b/app/core/task_manager.py @@ -26,15 +26,13 @@ v4.2 """ from loguru import logger -from PySide6.QtWidgets import QApplication from PySide6 import QtCore -import json from typing import Dict, Union, List -from .config import AppConfig +from .config import Config from .main_info_bar import MainInfoBar from app.models import MaaManager -from app.services import Notification +from app.services import Notify class Task(QtCore.QThread): @@ -51,15 +49,11 @@ class Task(QtCore.QThread): def __init__( self, - config: AppConfig, - notify: Notification, name: str, info: Dict[str, Dict[str, Union[str, int, bool]]], ): super(Task, self).__init__() - self.config = config - self.notify = notify self.name = name self.info = info @@ -84,17 +78,15 @@ class Task(QtCore.QThread): self.task_list[i][1] = "运行" self.update_task_list.emit(self.task_list) - if self.task_list[i][0] not in self.config.running_list: + if self.task_list[i][0] not in Config.running_list: - self.config.running_list.append(self.task_list[i][0]) + Config.running_list.append(self.task_list[i][0]) logger.info(f"任务开始:{self.task_list[i][0]}") self.push_info_bar.emit("info", "任务开始", self.task_list[i][0], 5000) if self.member_dict[self.task_list[i][0]][0] == "Maa": self.task = MaaManager( - self.config, - self.notify, "自动代理", self.member_dict[self.task_list[i][0]][1], ) @@ -110,7 +102,7 @@ class Task(QtCore.QThread): self.task.run() - self.config.running_list.remove(self.task_list[i][0]) + Config.running_list.remove(self.task_list[i][0]) self.task_list[i][1] = "完成" logger.info(f"任务完成:{self.task_list[i][0]}") @@ -129,8 +121,8 @@ class Task(QtCore.QThread): member_dict = {} - if (self.config.app_path / "config/MaaConfig").exists(): - for subdir in (self.config.app_path / "config/MaaConfig").iterdir(): + if (Config.app_path / "config/MaaConfig").exists(): + for subdir in (Config.app_path / "config/MaaConfig").iterdir(): if subdir.is_dir(): member_dict[subdir.name] = ["Maa", subdir] @@ -147,14 +139,12 @@ class TaskManager(QtCore.QObject): """业务调度器""" create_gui = QtCore.Signal(Task) + connect_gui = QtCore.Signal(Task) push_info_bar = QtCore.Signal(str, str, str, int) - def __init__(self, config: AppConfig, notify: Notification): + def __init__(self): super(TaskManager, self).__init__() - self.config = config - self.notify = notify - self.task_list: Dict[str, Task] = {} def add_task( @@ -162,29 +152,35 @@ class TaskManager(QtCore.QObject): ): """添加任务""" - if ( - mode == "运行队列" - and name not in self.config.running_list - and name not in self.task_list - ): + if name in Config.running_list or name in self.task_list: - logger.info(f"任务开始:{name}") - MainInfoBar.push_info_bar("info", "任务开始", name, 5000) + logger.warning(f"任务已存在:{name}") + MainInfoBar.push_info_bar("warning", "任务已存在", name, 5000) + return None - self.config.running_list.append(name) - self.task_list[name] = Task(self.config, self.notify, name, info) - self.task_list[name].push_info_bar.connect(MainInfoBar.push_info_bar) - self.task_list[name].accomplish.connect( - lambda logs: self.remove_task(name, logs) - ) + logger.info(f"任务开始:{name}") + MainInfoBar.push_info_bar("info", "任务开始", name, 3000) + + Config.running_list.append(name) + self.task_list[name] = Task(name, info) + self.task_list[name].push_info_bar.connect(MainInfoBar.push_info_bar) + self.task_list[name].accomplish.connect( + lambda logs: self.remove_task(name, logs) + ) + + if mode == "新窗口": self.create_gui.emit(self.task_list[name]) - self.task_list[name].start() + + elif mode == "主窗口": + self.connect_gui.emit(self.task_list[name]) + + self.task_list[name].start() def stop_task(self, name: str): """中止任务""" logger.info(f"中止任务:{name}") - MainInfoBar.push_info_bar("info", "中止任务", name, 5000) + MainInfoBar.push_info_bar("info", "中止任务", name, 3000) if name == "ALL": @@ -206,17 +202,20 @@ class TaskManager(QtCore.QObject): """移除任务标记""" logger.info(f"任务结束:{name}") - MainInfoBar.push_info_bar("info", "任务结束", name, 5000) + MainInfoBar.push_info_bar("info", "任务结束", name, 3000) if len(logs) > 0: time = logs[0][1]["Time"] history = "" for log in logs: - self.config.save_history(log[0], log[1]) + Config.save_history(log[0], log[1]) history += ( f"任务名称:{log[0]},{log[1]["History"].replace("\n","\n ")}\n" ) - self.config.save_history(name, {"Time": time, "History": history}) + Config.save_history(name, {"Time": time, "History": history}) self.task_list.pop(name) - self.config.running_list.remove(name) + Config.running_list.remove(name) + + +Task_manager = TaskManager() diff --git a/app/core/timer.py b/app/core/timer.py index 9c38a41..9f9c459 100644 --- a/app/core/timer.py +++ b/app/core/timer.py @@ -31,26 +31,19 @@ from PySide6 import QtCore import json import datetime -from .config import AppConfig -from .task_manager import TaskManager -from app.services import SystemHandler +from .config import Config +from .task_manager import Task_manager +from app.services import System class MainTimer(QWidget): def __init__( self, - config: AppConfig, - system: SystemHandler, - task_manager: TaskManager, parent=None, ): super().__init__(parent) - self.config = config - self.system = system - self.task_manager = task_manager - self.Timer = QtCore.QTimer() self.Timer.timeout.connect(self.timed_start) self.Timer.timeout.connect(self.set_silence) @@ -69,7 +62,7 @@ class MainTimer(QWidget): if not info["QueueSet"]["Enabled"]: continue - history = self.config.get_history(name) + history = Config.get_history(name) time_set = [ info["Time"][f"TimeSet_{_}"] @@ -81,22 +74,22 @@ class MainTimer(QWidget): if ( curtime[11:16] in time_set and curtime != history["Time"][:16] - and name not in self.config.running_list + and name not in Config.running_list ): logger.info(f"按时间调起任务:{name}") - self.task_manager.add_task("运行队列", name, info) + Task_manager.add_task("新窗口", name, info) def set_silence(self): """设置静默模式""" # # 临时 - # windows = self.system.get_window_info() + # windows = System.get_window_info() # if any(emulator_path in _ for _ in windows): # try: # pyautogui.hotkey(*boss_key) # except pyautogui.FailSafeException as e: # 执行日志记录,暂时缺省 - logger.debug(self.config.running_list) + logger.debug(Config.running_list) def set_last_time(self): """设置上次运行时间""" @@ -108,12 +101,13 @@ class MainTimer(QWidget): queue_list = [] - if (self.config.app_path / "config/QueueConfig").exists(): - for json_file in (self.config.app_path / "config/QueueConfig").glob( - "*.json" - ): + if (Config.app_path / "config/QueueConfig").exists(): + for json_file in (Config.app_path / "config/QueueConfig").glob("*.json"): with json_file.open("r", encoding="utf-8") as f: info = json.load(f) queue_list.append([json_file.stem, info]) return queue_list + + +Main_timer = MainTimer() diff --git a/app/models/MAA.py b/app/models/MAA.py index 76adb72..c860282 100644 --- a/app/models/MAA.py +++ b/app/models/MAA.py @@ -35,8 +35,8 @@ import time from pathlib import Path from typing import List, Dict, Union -from app.core import AppConfig -from app.services import Notification +from app.core import Config +from app.services import Notify class MaaManager(QtCore.QObject): @@ -56,15 +56,11 @@ class MaaManager(QtCore.QObject): def __init__( self, - config: AppConfig, - notify: Notification, mode: str, config_path: Path, ): super(MaaManager, self).__init__() - self.config = config - self.notify = notify self.mode = mode self.config_path = config_path @@ -90,8 +86,8 @@ class MaaManager(QtCore.QObject): self.maa_exe_path = self.maa_root_path / "MAA.exe" self.boss_key = [ _.strip().lower() - for _ in self.config.global_config.get( - self.config.global_config.function_BossKey + for _ in Config.global_config.get( + Config.global_config.function_BossKey ).split("+") ] @@ -109,6 +105,12 @@ class MaaManager(QtCore.QObject): self.push_info_bar.emit( "error", "启动MAA代理进程失败", "您还未正确配置MAA路径!", -1 ) + self.accomplish.emit( + { + "Time": begin_time, + "History": "由于未正确配置MAA路径,MAA代理进程中止", + } + ) return None # 整理用户数据,筛选需代理的用户 @@ -176,7 +178,7 @@ class MaaManager(QtCore.QObject): creationflags=subprocess.CREATE_NO_WINDOW, ) # 添加静默进程数量标记 - self.config.if_silence_needed += 1 + Config.if_silence_needed += 1 # 记录是否超时的标记 self.if_time_out = False @@ -232,7 +234,7 @@ class MaaManager(QtCore.QObject): "检测到MAA进程完成代理任务\n正在等待相关程序结束\n请等待10s" ) # 移除静默进程数量标记 - self.config.if_silence_needed -= 1 + Config.if_silence_needed -= 1 for _ in range(10): if self.isInterruptionRequested: break @@ -253,9 +255,9 @@ class MaaManager(QtCore.QObject): ) killprocess.wait() # 移除静默进程数量标记 - self.config.if_silence_needed -= 1 + Config.if_silence_needed -= 1 # 推送异常通知 - self.notify.push_notification( + Notify.push_notification( "用户自动代理出现异常!", f"用户 {user[0].replace("_", " 今天的")}的{mode_book[j][5:7]}部分出现一次异常", f"{user[0].replace("_", " ")}的{mode_book[j][5:7]}出现异常", @@ -273,7 +275,7 @@ class MaaManager(QtCore.QObject): self.data[user[2]][3] -= 1 self.data[user[2]][14] += 1 user[1] = "完成" - self.notify.push_notification( + Notify.push_notification( "成功完成一个自动代理任务!", f"已完成用户 {user[0].replace("_", " 今天的")}任务", f"已完成 {user[0].replace("_", " 的")}", @@ -491,21 +493,19 @@ class MaaManager(QtCore.QObject): ) # 推送代理结果通知 - self.notify.push_notification( + Notify.push_notification( f"{self.mode[2:4]}任务已完成!", f"已完成用户数:{len(over_index)},未完成用户数:{len(error_index) + len(wait_index)}", f"已完成用户数:{len(over_index)},未完成用户数:{len(error_index) + len(wait_index)}", 10, ) - if not self.config.global_config.get( - self.config.global_config.notify_IfSendErrorOnly + if not Config.global_config.get( + Config.global_config.notify_IfSendErrorOnly ) or ( - self.config.global_config.get( - self.config.global_config.notify_IfSendErrorOnly - ) + Config.global_config.get(Config.global_config.notify_IfSendErrorOnly) and len(error_index) + len(wait_index) != 0 ): - self.notify.send_mail( + Notify.send_mail( f"{self.mode[:4]}任务报告", f"{end_log}\n\nAUTO_MAA 敬上\n\n我们根据您在 AUTO_MAA 中的设置发送了这封电子邮件,本邮件无需回复\n", ) @@ -643,7 +643,7 @@ class MaaManager(QtCore.QObject): "Start.OpenEmulatorAfterLaunch" ] = "True" # 启动MAA后自动开启模拟器 - if self.config.if_silence_needed > 0: + if Config.if_silence_needed > 0: data["Global"]["Start.MinimizeDirectly"] = "True" # 启动MAA后直接最小化 data["Global"]["GUI.UseTray"] = "True" # 显示托盘图标 data["Global"]["GUI.MinimizeToTray"] = "True" # 最小化时隐藏至托盘 @@ -920,7 +920,7 @@ class MaaManager(QtCore.QObject): "Start.OpenEmulatorAfterLaunch" ] = "False" # 启动MAA后自动开启模拟器 - if self.config.if_silence_needed > 0: + if Config.if_silence_needed > 0: data["Global"][ "Start.MinimizeDirectly" ] = "False" # 启动MAA后直接最小化 @@ -963,7 +963,7 @@ class MaaManager(QtCore.QObject): # 覆写配置文件 with self.maa_set_path.open(mode="w", encoding="utf-8") as f: - json.dump(data, f, indent=4) + json.dump(data, f, ensure_ascii=False, indent=4) return True diff --git a/app/models/__pycache__/MAA.cpython-312.pyc b/app/models/__pycache__/MAA.cpython-312.pyc index 19917a2..69234c0 100644 Binary files a/app/models/__pycache__/MAA.cpython-312.pyc and b/app/models/__pycache__/MAA.cpython-312.pyc differ diff --git a/app/services/__init__.py b/app/services/__init__.py index 2ca32a7..7c0349d 100644 --- a/app/services/__init__.py +++ b/app/services/__init__.py @@ -29,8 +29,8 @@ __version__ = "4.2.0" __author__ = "DLmaster361 " __license__ = "GPL-3.0 license" -from .notification import Notification -from .security import CryptoHandler -from .system import SystemHandler +from .notification import Notify +from .security import Crypto +from .system import System -__all__ = ["Notification", "CryptoHandler", "SystemHandler"] +__all__ = ["Notify", "Crypto", "System"] diff --git a/app/services/__pycache__/__init__.cpython-312.pyc b/app/services/__pycache__/__init__.cpython-312.pyc index 6ae138a..84777a5 100644 Binary files a/app/services/__pycache__/__init__.cpython-312.pyc and b/app/services/__pycache__/__init__.cpython-312.pyc differ diff --git a/app/services/__pycache__/notification.cpython-312.pyc b/app/services/__pycache__/notification.cpython-312.pyc index d30e53a..96658da 100644 Binary files a/app/services/__pycache__/notification.cpython-312.pyc and b/app/services/__pycache__/notification.cpython-312.pyc differ diff --git a/app/services/__pycache__/security.cpython-312.pyc b/app/services/__pycache__/security.cpython-312.pyc index d0d9a0f..67c0b2a 100644 Binary files a/app/services/__pycache__/security.cpython-312.pyc and b/app/services/__pycache__/security.cpython-312.pyc differ diff --git a/app/services/__pycache__/system.cpython-312.pyc b/app/services/__pycache__/system.cpython-312.pyc index a62bc19..3979e22 100644 Binary files a/app/services/__pycache__/system.cpython-312.pyc and b/app/services/__pycache__/system.cpython-312.pyc differ diff --git a/app/services/notification.py b/app/services/notification.py index 76d0810..07865ec 100644 --- a/app/services/notification.py +++ b/app/services/notification.py @@ -30,27 +30,22 @@ import smtplib from email.mime.text import MIMEText from email.header import Header from email.utils import formataddr -import os -from app.core import AppConfig +from app.core import Config class Notification: - def __init__(self, config: AppConfig): - - self.config = config - def push_notification(self, title, message, ticker, t): """推送系统通知""" - if self.config.global_config.get(self.config.global_config.notify_IfPushPlyer): + if Config.global_config.get(Config.global_config.notify_IfPushPlyer): notification.notify( title=title, message=message, app_name="AUTO_MAA", - app_icon=str(self.config.app_path / "resources/icons/AUTO_MAA.ico"), + app_icon=str(Config.app_path / "resources/icons/AUTO_MAA.ico"), timeout=t, ticker=ticker, toast=True, @@ -64,7 +59,7 @@ class Notification: # 声明:此邮箱为AUTO_MAA项目组资产,未经授权不得私自使用 # 注意:此声明注释只有使用者更换发信邮箱时才能删除,本条规则优先级高于GPLv3 - if self.config.global_config.get(self.config.global_config.notify_IfSendMail): + if Config.global_config.get(Config.global_config.notify_IfSendMail): # 第三方 SMTP 服务配置 mail_host = "smtp.163.com" # 设置服务器 @@ -82,9 +77,7 @@ class Notification: message["To"] = formataddr( ( Header("AUTO_MAA用户", "utf-8").encode(), - self.config.global_config.get( - self.config.global_config.notify_MailAddress - ), + Config.global_config.get(Config.global_config.notify_MailAddress), ) ) # 收件人显示的名字 message["Subject"] = Header(title, "utf-8") @@ -94,9 +87,7 @@ class Notification: smtpObj.login(mail_sender, mail_key) smtpObj.sendmail( mail_sender, - self.config.global_config.get( - self.config.global_config.notify_MailAddress - ), + Config.global_config.get(Config.global_config.notify_MailAddress), message.as_string(), ) return True @@ -104,3 +95,6 @@ class Notification: return f"发送邮件时出错:\n{e}" finally: smtpObj.quit() + + +Notify = Notification() diff --git a/app/services/security.py b/app/services/security.py index 0836428..21d9a80 100644 --- a/app/services/security.py +++ b/app/services/security.py @@ -25,7 +25,6 @@ v4.2 作者:DLmaster_361 """ -import os import hashlib import random import secrets @@ -34,37 +33,33 @@ from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_OAEP from Crypto.Util.Padding import pad, unpad -from app.core import AppConfig +from app.core import Config class CryptoHandler: - def __init__(self, config: AppConfig): - - self.config = config - def get_PASSWORD(self, PASSWORD: str) -> None: """配置管理密钥""" # 生成目录 - self.config.key_path.mkdir(parents=True, exist_ok=True) + Config.key_path.mkdir(parents=True, exist_ok=True) # 生成RSA密钥对 key = RSA.generate(2048) public_key_local = key.publickey() private_key = key # 保存RSA公钥 - (self.config.app_path / "data/key/public_key.pem").write_bytes( + (Config.app_path / "data/key/public_key.pem").write_bytes( public_key_local.exportKey() ) # 生成密钥转换与校验随机盐 PASSWORD_salt = secrets.token_hex(random.randint(32, 1024)) - (self.config.app_path / "data/key/PASSWORDsalt.txt").write_text( + (Config.app_path / "data/key/PASSWORDsalt.txt").write_text( PASSWORD_salt, encoding="utf-8", ) verify_salt = secrets.token_hex(random.randint(32, 1024)) - (self.config.app_path / "data/key/verifysalt.txt").write_text( + (Config.app_path / "data/key/verifysalt.txt").write_text( verify_salt, encoding="utf-8", ) @@ -76,22 +71,20 @@ class CryptoHandler: AES_password_verify = hashlib.sha256( AES_password + verify_salt.encode("utf-8") ).digest() - (self.config.app_path / "data/key/AES_password_verify.bin").write_bytes( + (Config.app_path / "data/key/AES_password_verify.bin").write_bytes( AES_password_verify ) # AES-256加密RSA私钥并保存密文 AES_key = AES.new(AES_password, AES.MODE_ECB) private_key_local = AES_key.encrypt(pad(private_key.exportKey(), 32)) - (self.config.app_path / "data/key/private_key.bin").write_bytes( - private_key_local - ) + (Config.app_path / "data/key/private_key.bin").write_bytes(private_key_local) def encryptx(self, note: str) -> bytes: """加密数据""" # 读取RSA公钥 public_key_local = RSA.import_key( - (self.config.app_path / "data/key/public_key.pem").read_bytes() + (Config.app_path / "data/key/public_key.pem").read_bytes() ) # 使用RSA公钥对数据进行加密 cipher = PKCS1_OAEP.new(public_key_local) @@ -103,22 +96,20 @@ class CryptoHandler: # 读入RSA私钥密文、盐与校验哈希值 private_key_local = ( - (self.config.app_path / "data/key/private_key.bin").read_bytes().strip() + (Config.app_path / "data/key/private_key.bin").read_bytes().strip() ) PASSWORD_salt = ( - (self.config.app_path / "data/key/PASSWORDsalt.txt") + (Config.app_path / "data/key/PASSWORDsalt.txt") .read_text(encoding="utf-8") .strip() ) verify_salt = ( - (self.config.app_path / "data/key/verifysalt.txt") + (Config.app_path / "data/key/verifysalt.txt") .read_text(encoding="utf-8") .strip() ) AES_password_verify = ( - (self.config.app_path / "data/key/AES_password_verify.bin") - .read_bytes() - .strip() + (Config.app_path / "data/key/AES_password_verify.bin").read_bytes().strip() ) # 将管理密钥转化为AES-256密钥并验证 AES_password = hashlib.sha256( @@ -149,7 +140,7 @@ class CryptoHandler: # 使用新管理密钥重新加密 self.get_PASSWORD(PASSWORD_new) for i in range(len(data)): - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET password = ? WHERE mode = ? AND uid = ?", ( self.encryptx(new_data[i]), @@ -157,7 +148,7 @@ class CryptoHandler: data[i][16], ), ) - self.config.db.commit(), + Config.db.commit(), new_data[i] = None del new_data @@ -165,3 +156,6 @@ class CryptoHandler: """验证管理密钥""" return bool(self.decryptx(self.encryptx(""), PASSWORD) != "管理密钥错误") + + +Crypto = CryptoHandler() diff --git a/app/services/system.py b/app/services/system.py index d76fc8c..8099229 100644 --- a/app/services/system.py +++ b/app/services/system.py @@ -31,7 +31,7 @@ import win32process import winreg import psutil -from app.core import AppConfig +from app.core import Config class SystemHandler: @@ -39,9 +39,7 @@ class SystemHandler: ES_CONTINUOUS = 0x80000000 ES_SYSTEM_REQUIRED = 0x00000001 - def __init__(self, config: AppConfig): - - self.config = config + def __init__(self): self.set_Sleep() self.set_SelfStart() @@ -49,9 +47,7 @@ class SystemHandler: def set_Sleep(self): """同步系统休眠状态""" - if self.config.global_config.get( - self.config.global_config.function_IfAllowSleep - ): + if Config.global_config.get(Config.global_config.function_IfAllowSleep): # 设置系统电源状态 ctypes.windll.kernel32.SetThreadExecutionState( self.ES_CONTINUOUS | self.ES_SYSTEM_REQUIRED @@ -64,7 +60,7 @@ class SystemHandler: """同步开机自启""" if ( - self.config.global_config.get(self.config.global_config.start_IfSelfStart) + Config.global_config.get(Config.global_config.start_IfSelfStart) and not self.is_startup() ): key = winreg.OpenKey( @@ -73,14 +69,10 @@ class SystemHandler: winreg.KEY_SET_VALUE, winreg.KEY_ALL_ACCESS | winreg.KEY_WRITE | winreg.KEY_CREATE_SUB_KEY, ) - winreg.SetValueEx( - key, "AUTO_MAA", 0, winreg.REG_SZ, self.config.app_path_sys - ) + winreg.SetValueEx(key, "AUTO_MAA", 0, winreg.REG_SZ, Config.app_path_sys) winreg.CloseKey(key) elif ( - not self.config.global_config.get( - self.config.global_config.start_IfSelfStart - ) + not Config.global_config.get(Config.global_config.start_IfSelfStart) and self.is_startup() ): key = winreg.OpenKey( @@ -123,3 +115,6 @@ class SystemHandler: window_info = [] win32gui.EnumWindows(callback, window_info) return window_info + + +System = SystemHandler() diff --git a/app/ui/__pycache__/Widget.cpython-312.pyc b/app/ui/__pycache__/Widget.cpython-312.pyc index 887cab3..c54c9a6 100644 Binary files a/app/ui/__pycache__/Widget.cpython-312.pyc and b/app/ui/__pycache__/Widget.cpython-312.pyc differ diff --git a/app/ui/__pycache__/dispatch_center.cpython-312.pyc b/app/ui/__pycache__/dispatch_center.cpython-312.pyc index 67cad79..0cb3990 100644 Binary files a/app/ui/__pycache__/dispatch_center.cpython-312.pyc and b/app/ui/__pycache__/dispatch_center.cpython-312.pyc differ diff --git a/app/ui/__pycache__/main_window.cpython-312.pyc b/app/ui/__pycache__/main_window.cpython-312.pyc index 8c8f6ce..fdf31da 100644 Binary files a/app/ui/__pycache__/main_window.cpython-312.pyc and b/app/ui/__pycache__/main_window.cpython-312.pyc differ diff --git a/app/ui/__pycache__/member_manager.cpython-312.pyc b/app/ui/__pycache__/member_manager.cpython-312.pyc index e8fef47..8903c06 100644 Binary files a/app/ui/__pycache__/member_manager.cpython-312.pyc and b/app/ui/__pycache__/member_manager.cpython-312.pyc differ diff --git a/app/ui/__pycache__/queue_manager.cpython-312.pyc b/app/ui/__pycache__/queue_manager.cpython-312.pyc index 72cf6bf..d25e03d 100644 Binary files a/app/ui/__pycache__/queue_manager.cpython-312.pyc and b/app/ui/__pycache__/queue_manager.cpython-312.pyc differ diff --git a/app/ui/__pycache__/setting.cpython-312.pyc b/app/ui/__pycache__/setting.cpython-312.pyc index 8f57af6..fbadc51 100644 Binary files a/app/ui/__pycache__/setting.cpython-312.pyc and b/app/ui/__pycache__/setting.cpython-312.pyc differ diff --git a/app/ui/dispatch_center.py b/app/ui/dispatch_center.py index a955a95..00f73fb 100644 --- a/app/ui/dispatch_center.py +++ b/app/ui/dispatch_center.py @@ -60,18 +60,16 @@ import shutil uiLoader = QUiLoader() -from app.core import AppConfig, TaskManager, Task, MainInfoBar -from app.services import Notification +from app.core import Config, Task_manager, Task, MainInfoBar +from app.services import Notify class DispatchCenter(QWidget): - def __init__(self, config: AppConfig, task_manager: TaskManager, parent=None): + def __init__(self, parent=None): super().__init__(parent) self.setObjectName("调度中枢") - self.config = config - self.task_manager = task_manager self.pivot = Pivot(self) self.stackedWidget = QStackedWidget(self) @@ -79,7 +77,7 @@ class DispatchCenter(QWidget): self.script_list: Dict[str, DispatchBox] = {} - dispatch_box = DispatchBox(self.config, "主调度台", self) + dispatch_box = DispatchBox("主调度台", self) self.script_list["主调度台"] = dispatch_box self.stackedWidget.addWidget(self.script_list["主调度台"]) self.pivot.addItem( @@ -101,10 +99,10 @@ class DispatchCenter(QWidget): def add_board(self, task: Task) -> None: """添加一个调度台界面""" - dispatch_box = DispatchBox(self.config, task.name, self) + dispatch_box = DispatchBox(task.name, self) dispatch_box.top_bar.button.clicked.connect( - lambda: self.task_manager.stop_task(task.name) + lambda: Task_manager.stop_task(task.name) ) task.create_task_list.connect(dispatch_box.info.task.create_task) @@ -128,19 +126,54 @@ class DispatchCenter(QWidget): self.script_list[name].deleteLater() self.pivot.removeWidget(name) + def connect_main_board(self, task: Task) -> None: + """连接主调度台""" + + self.script_list["主调度台"].top_bar.button.clicked.disconnect() + self.script_list["主调度台"].top_bar.button.setText("中止任务") + self.script_list["主调度台"].top_bar.button.clicked.connect( + lambda: Task_manager.stop_task(task.name) + ) + task.create_task_list.connect( + self.script_list["主调度台"].info.task.create_task + ) + task.create_user_list.connect( + self.script_list["主调度台"].info.user.create_user + ) + task.update_task_list.connect( + self.script_list["主调度台"].info.task.update_task + ) + task.update_user_list.connect( + self.script_list["主调度台"].info.user.update_user + ) + task.update_log_text.connect( + self.script_list["主调度台"].info.log_text.text.setText + ) + task.accomplish.connect(lambda: self.disconnect_main_board(task.name)) + + def disconnect_main_board(self, name: str) -> None: + """断开主调度台""" + + self.script_list["主调度台"].top_bar.button.clicked.disconnect() + self.script_list["主调度台"].top_bar.button.setText("开始任务") + self.script_list["主调度台"].top_bar.button.clicked.connect( + self.script_list["主调度台"].top_bar.start_task + ) + self.script_list["主调度台"].info.log_text.text.setText( + Config.get_history(name)["History"] + ) + def update_top_bar(self): """更新顶栏""" list = [] - if (self.config.app_path / "config/QueueConfig").exists(): - for json_file in (self.config.app_path / "config/QueueConfig").glob( - "*.json" - ): + if (Config.app_path / "config/QueueConfig").exists(): + for json_file in (Config.app_path / "config/QueueConfig").glob("*.json"): list.append(f"队列 - {json_file.stem}") - if (self.config.app_path / "config/MaaConfig").exists(): - for subdir in (self.config.app_path / "config/MaaConfig").iterdir(): + if (Config.app_path / "config/MaaConfig").exists(): + for subdir in (Config.app_path / "config/MaaConfig").iterdir(): if subdir.is_dir(): list.append(f"实例 - Maa - {subdir.name}") @@ -150,13 +183,11 @@ class DispatchCenter(QWidget): class DispatchBox(QWidget): - def __init__(self, config: AppConfig, name: str, parent=None): + def __init__(self, name: str, parent=None): super().__init__(parent) self.setObjectName(name) - self.config = config - layout = QVBoxLayout() scrollArea = ScrollArea() @@ -195,6 +226,7 @@ class DispatchBox(QWidget): self.mode.setPlaceholderText("请选择调度模式") self.button = PushButton("开始任务") + self.button.clicked.connect(self.start_task) Layout.addWidget(self.object) Layout.addWidget(self.mode) @@ -210,6 +242,40 @@ class DispatchBox(QWidget): Layout.addStretch(1) Layout.addWidget(self.button) + def start_task(self): + """开始任务""" + + if self.object.currentIndex() == -1: + logger.warning("未选择调度对象") + MainInfoBar.push_info_bar( + "warning", "未选择调度对象", "请选择后再开始任务", 5000 + ) + return None + + if self.mode.currentIndex() == -1: + logger.warning("未选择调度模式") + MainInfoBar.push_info_bar( + "warning", "未选择调度模式", "请选择后再开始任务", 5000 + ) + return None + + name = self.object.currentText().split(" - ")[1] + + if name in Config.running_list: + logger.warning(f"任务已存在:{name}") + MainInfoBar.push_info_bar("warning", "任务已存在", name, 5000) + return None + + if self.object.currentText().split(" - ")[0] == "队列": + + with (Config.app_path / f"config/QueueConfig/{name}.json").open( + mode="r", encoding="utf-8" + ) as f: + info = json.load(f) + + logger.info(f"用户添加任务:{name}") + Task_manager.add_task("主窗口", name, info) + class DispatchInfoCard(HeaderCardWidget): def __init__(self, parent=None): diff --git a/app/ui/else.py b/app/ui/else.py index 6023aeb..86ca53e 100644 --- a/app/ui/else.py +++ b/app/ui/else.py @@ -6,9 +6,9 @@ class Main(QWidget): def __init__(self, config: AppConfig, notify: Notification, crypto: CryptoHandler): super().__init__() - self.config = config - self.notify = notify - self.crypto = crypto + Config = config + Notify = notify + Crypto = crypto @@ -23,9 +23,9 @@ class Main(QWidget): # uiLoader.registerCustomWidget(BodyLabel) # # 导入ui配置 - # self.ui = uiLoader.load(self.config.app_path / "resources/gui/main.ui") + # self.ui = uiLoader.load(Config.app_path / "resources/gui/main.ui") # self.ui.setWindowIcon( - # QIcon(str(self.config.app_path / "resources/icons/AUTO_MAA.ico")) + # QIcon(str(Config.app_path / "resources/icons/AUTO_MAA.ico")) # ) # # 初始化控件 @@ -176,12 +176,12 @@ class Main(QWidget): # self.change_password.clicked.connect(self.change_PASSWORD) # 初始化线程 - self.MaaManager = MaaManager(self.config) + self.MaaManager = MaaManager(Config) self.MaaManager.question.connect(lambda: self.read("question_runner")) self.MaaManager.update_gui.connect(self.update_board) self.MaaManager.update_user_info.connect(self.change_user_info) - self.MaaManager.push_notification.connect(self.notify.push_notification) - self.MaaManager.send_mail.connect(self.notify.send_mail) + self.MaaManager.push_notification.connect(Notify.push_notification) + self.MaaManager.send_mail.connect(Notify.send_mail) self.MaaManager.accomplish.connect(lambda: self.maa_ender("自动代理_结束")) self.MaaManager.get_json.connect(self.get_maa_config) self.MaaManager.set_silence.connect(self.switch_silence) @@ -198,79 +198,79 @@ class Main(QWidget): # self.update_config() # 启动后直接开始代理 - if self.config.content["Default"]["SelfSet.IfProxyDirectly"] == "True": + if Config.content["Default"]["SelfSet.IfProxyDirectly"] == "True": self.maa_starter("自动代理") # def update_config(self): - # """将self.config中的程序配置同步至GUI界面""" + # """将Config中的程序配置同步至GUI界面""" # # 阻止GUI程序配置被立即读入程序形成死循环 # self.if_update_config = False # self.main_tab.setCurrentIndex( - # self.config.content["Default"]["SelfSet.MainIndex"] + # Config.content["Default"]["SelfSet.MainIndex"] # ) - # self.maa_path.setText(str(Path(self.config.content["Default"]["MaaSet.path"]))) - # self.routine.setValue(self.config.content["Default"]["TimeLimit.routine"]) + # self.maa_path.setText(str(Path(Config.content["Default"]["MaaSet.path"]))) + # self.routine.setValue(Config.content["Default"]["TimeLimit.routine"]) # self.annihilation.setValue( - # self.config.content["Default"]["TimeLimit.annihilation"] + # Config.content["Default"]["TimeLimit.annihilation"] # ) - # self.num.setValue(self.config.content["Default"]["TimesLimit.run"]) - # self.mail_address.setText(self.config.content["Default"]["SelfSet.MailAddress"]) - # self.boss_key.setText(self.config.content["Default"]["SelfSet.BossKey"]) + # self.num.setValue(Config.content["Default"]["TimesLimit.run"]) + # self.mail_address.setText(Config.content["Default"]["SelfSet.MailAddress"]) + # self.boss_key.setText(Config.content["Default"]["SelfSet.BossKey"]) # self.if_self_start.setChecked( - # bool(self.config.content["Default"]["SelfSet.IfSelfStart"] == "True") + # bool(Config.content["Default"]["SelfSet.IfSelfStart"] == "True") # ) # self.if_sleep.setChecked( - # bool(self.config.content["Default"]["SelfSet.IfAllowSleep"] == "True") + # bool(Config.content["Default"]["SelfSet.IfAllowSleep"] == "True") # ) # self.if_proxy_directly.setChecked( - # bool(self.config.content["Default"]["SelfSet.IfProxyDirectly"] == "True") + # bool(Config.content["Default"]["SelfSet.IfProxyDirectly"] == "True") # ) # self.if_send_mail.setChecked( - # bool(self.config.content["Default"]["SelfSet.IfSendMail"] == "True") + # bool(Config.content["Default"]["SelfSet.IfSendMail"] == "True") # ) # self.mail_address.setVisible( - # bool(self.config.content["Default"]["SelfSet.IfSendMail"] == "True") + # bool(Config.content["Default"]["SelfSet.IfSendMail"] == "True") # ) # self.if_send_error_only.setChecked( # bool( - # self.config.content["Default"]["SelfSet.IfSendMail.OnlyError"] == "True" + # Config.content["Default"]["SelfSet.IfSendMail.OnlyError"] == "True" # ) # ) # self.if_send_error_only.setVisible( - # bool(self.config.content["Default"]["SelfSet.IfSendMail"] == "True") + # bool(Config.content["Default"]["SelfSet.IfSendMail"] == "True") # ) # self.if_silence.setChecked( - # bool(self.config.content["Default"]["SelfSet.IfSilence"] == "True") + # bool(Config.content["Default"]["SelfSet.IfSilence"] == "True") # ) # self.boss_key.setVisible( - # bool(self.config.content["Default"]["SelfSet.IfSilence"] == "True") + # bool(Config.content["Default"]["SelfSet.IfSilence"] == "True") # ) # self.if_to_tray.setChecked( - # bool(self.config.content["Default"]["SelfSet.IfToTray"] == "True") + # bool(Config.content["Default"]["SelfSet.IfToTray"] == "True") # ) # for i in range(10): # self.start_time[i][0].setChecked( - # bool(self.config.content["Default"][f"TimeSet.set{i + 1}"] == "True") + # bool(Config.content["Default"][f"TimeSet.set{i + 1}"] == "True") # ) # time = QtCore.QTime( - # int(self.config.content["Default"][f"TimeSet.run{i + 1}"][:2]), - # int(self.config.content["Default"][f"TimeSet.run{i + 1}"][3:]), + # int(Config.content["Default"][f"TimeSet.run{i + 1}"][:2]), + # int(Config.content["Default"][f"TimeSet.run{i + 1}"][3:]), # ) # self.start_time[i][1].setTime(time) # self.if_update_config = True @@ -281,20 +281,20 @@ class Main(QWidget): self.update_user_info("normal") def change_config(self): - """将GUI中发生修改的程序配置同步至self.config变量""" + """将GUI中发生修改的程序配置同步至Config变量""" - # 验证能否写入self.config变量 + # 验证能否写入Config变量 if not self.if_update_config: return None # 验证MAA路径 - if Path(self.config.content["Default"]["MaaSet.path"]) != Path( + if Path(Config.content["Default"]["MaaSet.path"]) != Path( self.maa_path.text() ): if (Path(self.maa_path.text()) / "MAA.exe").exists() and ( Path(self.maa_path.text()) / "config/gui.json" ).exists(): - self.config.content["Default"]["MaaSet.path"] = str( + Config.content["Default"]["MaaSet.path"] = str( Path(self.maa_path.text()) ) self.get_maa_config(["Default"]) @@ -307,62 +307,62 @@ class Main(QWidget): if choice.exec(): pass - self.config.content["Default"][ + Config.content["Default"][ "SelfSet.MainIndex" ] = self.main_tab.currentIndex() - self.config.content["Default"]["TimeLimit.routine"] = self.routine.value() - self.config.content["Default"][ + Config.content["Default"]["TimeLimit.routine"] = self.routine.value() + Config.content["Default"][ "TimeLimit.annihilation" ] = self.annihilation.value() - self.config.content["Default"]["TimesLimit.run"] = self.num.value() - self.config.content["Default"]["SelfSet.MailAddress"] = self.mail_address.text() - self.config.content["Default"]["SelfSet.BossKey"] = self.boss_key.text() + Config.content["Default"]["TimesLimit.run"] = self.num.value() + Config.content["Default"]["SelfSet.MailAddress"] = self.mail_address.text() + Config.content["Default"]["SelfSet.BossKey"] = self.boss_key.text() if self.if_sleep.isChecked(): - self.config.content["Default"]["SelfSet.IfAllowSleep"] = "True" + Config.content["Default"]["SelfSet.IfAllowSleep"] = "True" else: - self.config.content["Default"]["SelfSet.IfAllowSleep"] = "False" + Config.content["Default"]["SelfSet.IfAllowSleep"] = "False" if self.if_self_start.isChecked(): - self.config.content["Default"]["SelfSet.IfSelfStart"] = "True" + Config.content["Default"]["SelfSet.IfSelfStart"] = "True" else: - self.config.content["Default"]["SelfSet.IfSelfStart"] = "False" + Config.content["Default"]["SelfSet.IfSelfStart"] = "False" if self.if_proxy_directly.isChecked(): - self.config.content["Default"]["SelfSet.IfProxyDirectly"] = "True" + Config.content["Default"]["SelfSet.IfProxyDirectly"] = "True" else: - self.config.content["Default"]["SelfSet.IfProxyDirectly"] = "False" + Config.content["Default"]["SelfSet.IfProxyDirectly"] = "False" if self.if_send_mail.isChecked(): - self.config.content["Default"]["SelfSet.IfSendMail"] = "True" + Config.content["Default"]["SelfSet.IfSendMail"] = "True" else: - self.config.content["Default"]["SelfSet.IfSendMail"] = "False" + Config.content["Default"]["SelfSet.IfSendMail"] = "False" if self.if_send_error_only.isChecked(): - self.config.content["Default"]["SelfSet.IfSendMail.OnlyError"] = "True" + Config.content["Default"]["SelfSet.IfSendMail.OnlyError"] = "True" else: - self.config.content["Default"]["SelfSet.IfSendMail.OnlyError"] = "False" + Config.content["Default"]["SelfSet.IfSendMail.OnlyError"] = "False" if self.if_silence.isChecked(): - self.config.content["Default"]["SelfSet.IfSilence"] = "True" + Config.content["Default"]["SelfSet.IfSilence"] = "True" else: - self.config.content["Default"]["SelfSet.IfSilence"] = "False" + Config.content["Default"]["SelfSet.IfSilence"] = "False" if self.if_to_tray.isChecked(): - self.config.content["Default"]["SelfSet.IfToTray"] = "True" + Config.content["Default"]["SelfSet.IfToTray"] = "True" else: - self.config.content["Default"]["SelfSet.IfToTray"] = "False" + Config.content["Default"]["SelfSet.IfToTray"] = "False" for i in range(10): if self.start_time[i][0].isChecked(): - self.config.content["Default"][f"TimeSet.set{i + 1}"] = "True" + Config.content["Default"][f"TimeSet.set{i + 1}"] = "True" else: - self.config.content["Default"][f"TimeSet.set{i + 1}"] = "False" + Config.content["Default"][f"TimeSet.set{i + 1}"] = "False" time = self.start_time[i][1].getTime().toString("HH:mm") - self.config.content["Default"][f"TimeSet.run{i + 1}"] = time + Config.content["Default"][f"TimeSet.run{i + 1}"] = time # 将配置信息同步至本地JSON文件 - self.config.save_config() + Config.save_config() # 同步程序配置至GUI self.update_config() @@ -374,22 +374,22 @@ class Main(QWidget): # 获取全局MAA配置文件 if info == ["Default"]: shutil.copy( - Path(self.config.content["Default"]["MaaSet.path"]) + Path(Config.content["Default"]["MaaSet.path"]) / "config/gui.json", - self.config.app_path / "data/MAAconfig/Default", + Config.app_path / "data/MAAconfig/Default", ) # 获取基建配置文件 # 获取高级用户MAA配置文件 elif info[2] in ["routine", "annihilation"]: ( - self.config.app_path + Config.app_path / f"data/MAAconfig/{self.user_mode_list[info[0]]}/{info[1]}/{info[2]}" ).mkdir(parents=True, exist_ok=True) shutil.copy( - Path(self.config.content["Default"]["MaaSet.path"]) + Path(Config.content["Default"]["MaaSet.path"]) / "config/gui.json", - self.config.app_path + Config.app_path / f"data/MAAconfig/{self.user_mode_list[info[0]]}/{info[1]}/{info[2]}", ) @@ -425,10 +425,10 @@ class Main(QWidget): # 检查MAA路径是否可用 if ( not ( - Path(self.config.content["Default"]["MaaSet.path"]) / "MAA.exe" + Path(Config.content["Default"]["MaaSet.path"]) / "MAA.exe" ).exists() and ( - Path(self.config.content["Default"]["MaaSet.path"]) / "config/gui.json" + Path(Config.content["Default"]["MaaSet.path"]) / "config/gui.json" ).exists() ): choice = MessageBox("错误", "您还未正确配置MAA路径!", self.ui) @@ -441,8 +441,8 @@ class Main(QWidget): # 配置参数 self.MaaManager.mode = mode - self.config.cur.execute("SELECT * FROM adminx WHERE True") - data = self.config.cur.fetchall() + Config.cur.execute("SELECT * FROM adminx WHERE True") + data = Config.cur.fetchall() self.MaaManager.data = [list(row) for row in data] # 启动执行线程 @@ -501,8 +501,8 @@ class Main(QWidget): elif "结束" in mode: shutil.copy( - self.config.app_path / "data/MAAconfig/Default/gui.json", - Path(self.config.content["Default"]["MaaSet.path"]) / "config", + Config.app_path / "data/MAAconfig/Default/gui.json", + Path(Config.content["Default"]["MaaSet.path"]) / "config", ) self.user_add.setEnabled(True) self.user_del.setEnabled(True) diff --git a/app/ui/main_window.py b/app/ui/main_window.py index 8de6687..f86e299 100644 --- a/app/ui/main_window.py +++ b/app/ui/main_window.py @@ -47,8 +47,8 @@ from qfluentwidgets import ( from PySide6.QtGui import QIcon, QCloseEvent from PySide6 import QtCore -from app.core import AppConfig, TaskManager, MainTimer, MainInfoBar -from app.services import Notification, CryptoHandler, SystemHandler +from app.core import Config, Task_manager, Main_timer, MainInfoBar +from app.services import Notify, Crypto, System from .setting import Setting from .member_manager import MemberManager from .queue_manager import QueueManager @@ -57,23 +57,10 @@ from .dispatch_center import DispatchCenter class AUTO_MAA(MSFluentWindow): - def __init__( - self, - config: AppConfig, - notify: Notification, - crypto: CryptoHandler, - system: SystemHandler, - ): + def __init__(self): super().__init__() - self.config = config - self.notify = notify - self.crypto = crypto - self.system = system - - self.setWindowIcon( - QIcon(str(self.config.app_path / "resources/icons/AUTO_MAA.ico")) - ) + self.setWindowIcon(QIcon(str(Config.app_path / "resources/icons/AUTO_MAA.ico"))) self.setWindowTitle("AUTO_MAA") setTheme(Theme.AUTO) @@ -83,14 +70,11 @@ class AUTO_MAA(MSFluentWindow): MainInfoBar.parent = self - self.task_manager = TaskManager(self.config, self.notify) - self.main_timer = MainTimer(self.config, self.system, self.task_manager, self) - # 创建主窗口 - self.setting = Setting(self.config, self.notify, self.crypto, self.system, self) - self.member_manager = MemberManager(self.config, self.notify, self.crypto, self) - self.queue_manager = QueueManager(self.config, self.notify, self) - self.dispatch_center = DispatchCenter(self.config, self.task_manager, self) + self.setting = Setting(self) + self.member_manager = MemberManager(self) + self.queue_manager = QueueManager(self) + self.dispatch_center = DispatchCenter(self) self.addSubInterface( self.setting, @@ -141,7 +125,7 @@ class AUTO_MAA(MSFluentWindow): # 创建系统托盘及其菜单 self.tray = QSystemTrayIcon( - QIcon(str(self.config.app_path / "resources/icons/AUTO_MAA.ico")), + QIcon(str(Config.app_path / "resources/icons/AUTO_MAA.ico")), self, ) self.tray.setToolTip("AUTO_MAA") @@ -184,7 +168,8 @@ class AUTO_MAA(MSFluentWindow): self.tray.setContextMenu(self.tray_menu) self.tray.activated.connect(self.on_tray_activated) - self.task_manager.create_gui.connect(self.dispatch_center.add_board) + Task_manager.create_gui.connect(self.dispatch_center.add_board) + Task_manager.connect_gui.connect(self.dispatch_center.connect_main_board) self.setting.ui.card_IfShowTray.checkedChanged.connect( lambda: self.show_ui("配置托盘") ) @@ -195,14 +180,16 @@ class AUTO_MAA(MSFluentWindow): def start_up_task(self) -> None: """启动时任务""" + logger.debug(f"{Config.app_path}, {Config.app_path_sys}") + # 加载配置 - qconfig.load(self.config.config_path, self.config.global_config) + qconfig.load(Config.config_path, Config.global_config) # 检查密码 self.setting.check_PASSWORD() # 检查更新 - if self.config.global_config.get(self.config.global_config.update_IfAutoUpdate): + if Config.global_config.get(Config.global_config.update_IfAutoUpdate): result = self.setting.get_update_info() if result == "已是最新版本~": MainInfoBar.push_info_bar("success", "更新检查", result, 3000) @@ -225,7 +212,7 @@ class AUTO_MAA(MSFluentWindow): def set_min_method(self) -> None: """设置最小化方法""" - if self.config.global_config.get(self.config.global_config.ui_IfToTray): + if Config.global_config.get(Config.global_config.ui_IfToTray): self.titleBar.minBtn.clicked.disconnect() self.titleBar.minBtn.clicked.connect(lambda: self.show_ui("隐藏到托盘")) @@ -243,7 +230,7 @@ class AUTO_MAA(MSFluentWindow): # def start_task(self, mode): # """调起对应任务""" # if self.main.MaaManager.isRunning(): - # self.notify.push_notification( + # Notify.push_notification( # f"无法运行{mode}!", # "当前已有任务正在运行,请在该任务结束后重试", # "当前已有任务正在运行,请在该任务结束后重试", @@ -261,14 +248,14 @@ class AUTO_MAA(MSFluentWindow): # ): # self.main.maa_ender(f"{self.main.MaaManager.mode}_结束") # elif "设置MAA" in self.main.MaaManager.mode: - # self.notify.push_notification( + # Notify.push_notification( # "正在设置MAA!", # "正在运行设置MAA任务,无法中止", # "正在运行设置MAA任务,无法中止", # 3, # ) # else: - # self.notify.push_notification( + # Notify.push_notification( # "无任务运行!", # "当前无任务正在运行,无需中止", # "当前无任务正在运行,无需中止", @@ -289,32 +276,28 @@ class AUTO_MAA(MSFluentWindow): size = list( map( int, - self.config.global_config.get( - self.config.global_config.ui_size - ).split("x"), + Config.global_config.get(Config.global_config.ui_size).split("x"), ) ) location = list( map( int, - self.config.global_config.get( - self.config.global_config.ui_location - ).split("x"), + Config.global_config.get(Config.global_config.ui_location).split( + "x" + ), ) ) self.setGeometry(location[0], location[1], size[0], size[1]) self.show() if not if_quick: - if self.config.global_config.get( - self.config.global_config.ui_maximized - ): + if Config.global_config.get(Config.global_config.ui_maximized): self.showMaximized() self.set_min_method() self.show_ui("配置托盘") elif mode == "配置托盘": - if self.config.global_config.get(self.config.global_config.ui_IfShowTray): + if Config.global_config.get(Config.global_config.ui_IfShowTray): self.tray.show() else: self.tray.hide() @@ -324,18 +307,18 @@ class AUTO_MAA(MSFluentWindow): # 保存窗口相关属性 if not self.isMaximized(): - self.config.global_config.set( - self.config.global_config.ui_size, + Config.global_config.set( + Config.global_config.ui_size, f"{self.geometry().width()}x{self.geometry().height()}", ) - self.config.global_config.set( - self.config.global_config.ui_location, + Config.global_config.set( + Config.global_config.ui_location, f"{self.geometry().x()}x{self.geometry().y()}", ) - self.config.global_config.set( - self.config.global_config.ui_maximized, self.isMaximized() + Config.global_config.set( + Config.global_config.ui_maximized, self.isMaximized() ) - self.config.global_config.save() + Config.global_config.save() # 隐藏主窗口 if not if_quick: @@ -356,6 +339,6 @@ class AUTO_MAA(MSFluentWindow): # self.main.MaaManager.wait() # 关闭数据库连接 - self.config.close_database() + Config.close_database() event.accept() diff --git a/app/ui/member_manager.py b/app/ui/member_manager.py index e3729b2..3db87ba 100644 --- a/app/ui/member_manager.py +++ b/app/ui/member_manager.py @@ -57,8 +57,8 @@ import datetime import json import shutil -from app.core import AppConfig, MaaConfig, MainInfoBar -from app.services import Notification, CryptoHandler +from app.core import Config, MainInfoBar +from app.services import Notify, Crypto from .Widget import ( InputMessageBox, LineEditSettingCard, @@ -71,26 +71,19 @@ class MemberManager(QWidget): def __init__( self, - config: AppConfig, - notify: Notification, - crypto: CryptoHandler, parent=None, ): super().__init__(parent) self.setObjectName("脚本管理") - self.config = config - self.notify = notify - self.crypto = crypto - setTheme(Theme.AUTO) layout = QVBoxLayout(self) self.tools = CommandBar() - self.member_manager = MemberSettingBox(self.config, self.crypto, self) + self.member_manager = MemberSettingBox(self) # 逐个添加动作 self.tools.addActions( @@ -147,14 +140,14 @@ class MemberManager(QWidget): index = len(self.member_manager.search_member()) + 1 qconfig.load( - self.config.app_path / f"config/MaaConfig/脚本_{index}/config.json", - self.config.maa_config, + Config.app_path / f"config/MaaConfig/脚本_{index}/config.json", + Config.maa_config, ) - self.config.clear_maa_config() - self.config.maa_config.save() + Config.clear_maa_config() + Config.maa_config.save() - self.config.open_database("Maa", f"脚本_{index}") - self.config.init_database("Maa") + Config.open_database("Maa", f"脚本_{index}") + Config.init_database("Maa") self.member_manager.add_MaaSettingBox(index) self.member_manager.switch_SettingBox(index) @@ -181,16 +174,12 @@ class MemberManager(QWidget): self.member_manager.clear_SettingBox() - shutil.rmtree(self.config.app_path / f"config/{type[0]}Config/{name}") + shutil.rmtree(Config.app_path / f"config/{type[0]}Config/{name}") self.change_queue(name, "禁用") for member in move_list: - if ( - self.config.app_path / f"config/{member[1]}Config/{member[0]}" - ).exists(): - ( - self.config.app_path / f"config/{member[1]}Config/{member[0]}" - ).rename( - self.config.app_path + if (Config.app_path / f"config/{member[1]}Config/{member[0]}").exists(): + (Config.app_path / f"config/{member[1]}Config/{member[0]}").rename( + Config.app_path / f"config/{member[1]}Config/脚本_{int(member[0][3:])-1}", ) self.change_queue(member[0], f"脚本_{int(member[0][3:])-1}") @@ -216,16 +205,16 @@ class MemberManager(QWidget): self.member_manager.clear_SettingBox() - (self.config.app_path / f"config/{type_right[0]}Config/脚本_{index}").rename( - self.config.app_path / f"config/{type_right[0]}Config/脚本_0" + (Config.app_path / f"config/{type_right[0]}Config/脚本_{index}").rename( + Config.app_path / f"config/{type_right[0]}Config/脚本_0" ) self.change_queue(f"脚本_{index}", "脚本_0") - (self.config.app_path / f"config/{type_left[0]}Config/脚本_{index-1}").rename( - self.config.app_path / f"config/{type_left[0]}Config/脚本_{index}" + (Config.app_path / f"config/{type_left[0]}Config/脚本_{index-1}").rename( + Config.app_path / f"config/{type_left[0]}Config/脚本_{index}" ) self.change_queue(f"脚本_{index-1}", f"脚本_{index}") - (self.config.app_path / f"config/{type_right[0]}Config/脚本_0").rename( - self.config.app_path / f"config/{type_right[0]}Config/脚本_{index-1}" + (Config.app_path / f"config/{type_right[0]}Config/脚本_0").rename( + Config.app_path / f"config/{type_right[0]}Config/脚本_{index-1}" ) self.change_queue("脚本_0", f"脚本_{index-1}") @@ -250,16 +239,16 @@ class MemberManager(QWidget): self.member_manager.clear_SettingBox() - (self.config.app_path / f"config/{type_left[0]}Config/脚本_{index}").rename( - self.config.app_path / f"config/{type_left[0]}Config/脚本_0", + (Config.app_path / f"config/{type_left[0]}Config/脚本_{index}").rename( + Config.app_path / f"config/{type_left[0]}Config/脚本_0", ) self.change_queue(f"脚本_{index}", "脚本_0") - (self.config.app_path / f"config/{type_right[0]}Config/脚本_{index+1}").rename( - self.config.app_path / f"config/{type_right[0]}Config/脚本_{index}", + (Config.app_path / f"config/{type_right[0]}Config/脚本_{index+1}").rename( + Config.app_path / f"config/{type_right[0]}Config/脚本_{index}", ) self.change_queue(f"脚本_{index+1}", f"脚本_{index}") - (self.config.app_path / f"config/{type_left[0]}Config/脚本_0").rename( - self.config.app_path / f"config/{type_left[0]}Config/脚本_{index+1}", + (Config.app_path / f"config/{type_left[0]}Config/脚本_0").rename( + Config.app_path / f"config/{type_left[0]}Config/脚本_{index+1}", ) self.change_queue("脚本_0", f"脚本_{index+1}") @@ -267,7 +256,7 @@ class MemberManager(QWidget): def show_password(self): - if self.config.PASSWORD == "": + if Config.PASSWORD == "": choice = InputMessageBox( self, "请输入管理密钥", @@ -275,21 +264,21 @@ class MemberManager(QWidget): "密码", ) if choice.exec() and choice.input.text() != "": - self.config.PASSWORD = choice.input.text() + Config.PASSWORD = choice.input.text() self.member_manager.script_list[ int(self.member_manager.pivot.currentRouteKey()[3:]) - 1 ].user_setting.user_list.update_user_info("normal") self.key.setIcon(FluentIcon.VIEW) self.key.setChecked(True) else: - self.config.PASSWORD = "" + Config.PASSWORD = "" self.member_manager.script_list[ int(self.member_manager.pivot.currentRouteKey()[3:]) - 1 ].user_setting.user_list.update_user_info("normal") self.key.setIcon(FluentIcon.HIDE) self.key.setChecked(False) else: - self.config.PASSWORD = "" + Config.PASSWORD = "" self.member_manager.script_list[ int(self.member_manager.pivot.currentRouteKey()[3:]) - 1 ].user_setting.user_list.update_user_info("normal") @@ -299,10 +288,8 @@ class MemberManager(QWidget): def change_queue(self, old: str, new: str) -> None: """修改调度队列配置文件的队列参数""" - if (self.config.app_path / "config/QueueConfig").exists(): - for json_file in (self.config.app_path / "config/QueueConfig").glob( - "*.json" - ): + if (Config.app_path / "config/QueueConfig").exists(): + for json_file in (Config.app_path / "config/QueueConfig").glob("*.json"): with json_file.open("r", encoding="utf-8") as f: data = json.load(f) @@ -325,12 +312,10 @@ class MemberManager(QWidget): class MemberSettingBox(QWidget): - def __init__(self, config: AppConfig, crypto: CryptoHandler, parent=None): + def __init__(self, parent=None): super().__init__(parent) self.setObjectName("脚本管理") - self.config = config - self.crypto = crypto self.pivot = Pivot(self) self.stackedWidget = QStackedWidget(self) @@ -354,16 +339,16 @@ class MemberSettingBox(QWidget): member_list = self.search_member() qconfig.load( - self.config.app_path / "config/临时.json", - self.config.maa_config, + Config.app_path / "config/临时.json", + Config.maa_config, ) - self.config.clear_maa_config() + Config.clear_maa_config() for member in member_list: if member[1] == "Maa": - self.config.open_database(member[1], member[0]) + Config.open_database(member[1], member[0]) self.add_MaaSettingBox(int(member[0][3:])) - if (self.config.app_path / "config/临时.json").exists(): - (self.config.app_path / "config/临时.json").unlink() + if (Config.app_path / "config/临时.json").exists(): + (Config.app_path / "config/临时.json").unlink() self.switch_SettingBox(index) @@ -381,11 +366,11 @@ class MemberSettingBox(QWidget): type = [_[1] for _ in member_list if _[0] == f"脚本_{index}"] qconfig.load( - self.config.app_path + Config.app_path / f"config/{type[0]}Config/{self.script_list[index-1].objectName()}/config.json", - self.config.maa_config, + Config.maa_config, ) - self.config.open_database(type[0], self.script_list[index - 1].objectName()) + Config.open_database(type[0], self.script_list[index - 1].objectName()) self.script_list[index - 1].user_setting.user_list.update_user_info("normal") if if_chang_pivot: @@ -401,18 +386,18 @@ class MemberSettingBox(QWidget): self.script_list.clear() self.pivot.clear() qconfig.load( - self.config.app_path / "config/临时.json", - self.config.maa_config, + Config.app_path / "config/临时.json", + Config.maa_config, ) - self.config.clear_maa_config() - if (self.config.app_path / "config/临时.json").exists(): - (self.config.app_path / "config/临时.json").unlink() - self.config.close_database() + Config.clear_maa_config() + if (Config.app_path / "config/临时.json").exists(): + (Config.app_path / "config/临时.json").unlink() + Config.close_database() def add_MaaSettingBox(self, uid: int) -> None: """添加一个MAA设置界面""" - maa_setting_box = MaaSettingBox(self.config, self.crypto, uid, self) + maa_setting_box = MaaSettingBox(uid, self) self.script_list.append(maa_setting_box) @@ -425,8 +410,8 @@ class MemberSettingBox(QWidget): member_list = [] - if (self.config.app_path / "config/MaaConfig").exists(): - for subdir in (self.config.app_path / "config/MaaConfig").iterdir(): + if (Config.app_path / "config/MaaConfig").exists(): + for subdir in (Config.app_path / "config/MaaConfig").iterdir(): if subdir.is_dir(): member_list.append([subdir.name, "Maa"]) @@ -435,14 +420,11 @@ class MemberSettingBox(QWidget): class MaaSettingBox(QWidget): - def __init__(self, config: AppConfig, crypto: CryptoHandler, uid: int, parent=None): + def __init__(self, uid: int, parent=None): super().__init__(parent) self.setObjectName(f"脚本_{uid}") - self.config = config - self.crypto = crypto - layout = QVBoxLayout() scrollArea = ScrollArea() @@ -451,10 +433,8 @@ class MaaSettingBox(QWidget): content_widget = QWidget() content_layout = QVBoxLayout(content_widget) - self.app_setting = self.AppSettingCard(self, self.config, uid) - self.user_setting = self.UserSettingCard( - self, self.objectName(), self.config, self.crypto - ) + self.app_setting = self.AppSettingCard(self, uid) + self.user_setting = self.UserSettingCard(self, self.objectName()) content_layout.addWidget(self.app_setting) content_layout.addWidget(self.user_setting) @@ -468,12 +448,11 @@ class MaaSettingBox(QWidget): class AppSettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None, uid: int = None): + def __init__(self, parent=None, uid: int = None): super().__init__(parent) self.setTitle("MAA实例") - self.config = config self.uid = uid Layout = QVBoxLayout() @@ -483,13 +462,13 @@ class MaaSettingBox(QWidget): FluentIcon.EDIT, "实例名称", "用于标识MAA实例的名称", - self.config.maa_config.MaaSet_Name, + Config.maa_config.MaaSet_Name, ) self.card_Path = PushSettingCard( "选择文件夹", FluentIcon.FOLDER, "MAA目录", - self.config.maa_config.get(self.config.maa_config.MaaSet_Path), + Config.maa_config.get(Config.maa_config.MaaSet_Path), ) self.card_Set = PushSettingCard( "设置", @@ -497,12 +476,12 @@ class MaaSettingBox(QWidget): "MAA全局配置", "简洁模式下MAA将继承全局配置", ) - self.RunSet = self.RunSetSettingCard(self, self.config.maa_config) + self.RunSet = self.RunSetSettingCard(self) self.card_Path.clicked.connect(self.PathClicked) - self.config.maa_config.MaaSet_Path.valueChanged.connect( + Config.maa_config.MaaSet_Path.valueChanged.connect( lambda: self.card_Path.setContent( - self.config.maa_config.get(self.config.maa_config.MaaSet_Path) + Config.maa_config.get(Config.maa_config.MaaSet_Path) ) ) @@ -518,8 +497,7 @@ class MaaSettingBox(QWidget): folder = QFileDialog.getExistingDirectory(self, "选择MAA目录", "./") if ( not folder - or self.config.maa_config.get(self.config.maa_config.MaaSet_Path) - == folder + or Config.maa_config.get(Config.maa_config.MaaSet_Path) == folder ): logger.warning("选择MAA目录时未选择文件夹或未更改文件夹") MainInfoBar.push_info_bar( @@ -536,20 +514,19 @@ class MaaSettingBox(QWidget): ) return None - (self.config.app_path / f"config/MaaConfig/脚本_{self.uid}/Default").mkdir( + (Config.app_path / f"config/MaaConfig/脚本_{self.uid}/Default").mkdir( parents=True, exist_ok=True ) shutil.copy( Path(folder) / "config/gui.json", - self.config.app_path - / f"config/MaaConfig/脚本_{self.uid}/Default/gui.json", + Config.app_path / f"config/MaaConfig/脚本_{self.uid}/Default/gui.json", ) - self.config.maa_config.set(self.config.maa_config.MaaSet_Path, folder) + Config.maa_config.set(Config.maa_config.MaaSet_Path, folder) self.card_Path.setContent(folder) class RunSetSettingCard(ExpandGroupSettingCard): - def __init__(self, parent=None, maa_config: MaaConfig = None): + def __init__(self, parent=None): super().__init__( FluentIcon.SETTING, "运行", @@ -557,8 +534,6 @@ class MaaSettingBox(QWidget): parent, ) - self.maa_config = maa_config - widget = QWidget() Layout = QVBoxLayout(widget) @@ -567,7 +542,7 @@ class MaaSettingBox(QWidget): FluentIcon.PAGE_RIGHT, "剿灭代理超时限制", "MAA日志无变化时间超过该阈值视为超时,单位为分钟", - self.maa_config.RunSet_AnnihilationTimeLimit, + Config.maa_config.RunSet_AnnihilationTimeLimit, ) self.RoutineTimeLimit = SpinBoxSettingCard( @@ -575,7 +550,7 @@ class MaaSettingBox(QWidget): FluentIcon.PAGE_RIGHT, "自动代理超时限制", "MAA日志无变化时间超过该阈值视为超时,单位为分钟", - self.maa_config.RunSet_RoutineTimeLimit, + Config.maa_config.RunSet_RoutineTimeLimit, ) self.RunTimesLimit = SpinBoxSettingCard( @@ -583,7 +558,7 @@ class MaaSettingBox(QWidget): FluentIcon.PAGE_RIGHT, "代理重试次数限制", "若超过该次数限制仍未完成代理,视为代理失败", - self.maa_config.RunSet_RunTimesLimit, + Config.maa_config.RunSet_RunTimesLimit, ) Layout.addWidget(self.AnnihilationTimeLimit) @@ -601,20 +576,16 @@ class MaaSettingBox(QWidget): self, parent=None, name: str = None, - config: AppConfig = None, - crypto: CryptoHandler = None, ): super().__init__(parent) self.setTitle("用户列表") - self.config = config - self.crypto = crypto self.name = name Layout = QVBoxLayout() - self.user_list = self.UserListBox(self.name, self.config, self.crypto, self) + self.user_list = self.UserListBox(self.name, self) self.tools = CommandBar() self.tools.addActions( @@ -656,8 +627,8 @@ class MaaSettingBox(QWidget): def set_more(self): - self.config.cur.execute("SELECT * FROM adminx WHERE True") - data = self.config.cur.fetchall() + Config.cur.execute("SELECT * FROM adminx WHERE True") + data = Config.cur.fetchall() if self.user_list.pivot.currentRouteKey() == f"{self.name}_简洁用户列表": @@ -685,12 +656,12 @@ class MaaSettingBox(QWidget): ) if file_path != "": ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/simple/{choice.input[0].currentIndex()}/infrastructure" ).mkdir(parents=True, exist_ok=True) shutil.copy( file_path, - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/simple/{choice.input[0].currentIndex()}/infrastructure", ) else: @@ -712,13 +683,9 @@ class MaaSettingBox(QWidget): class UserListBox(QWidget): - def __init__( - self, name: str, config: AppConfig, crypto: CryptoHandler, parent=None - ): + def __init__(self, name: str, parent=None): super().__init__(parent) self.setObjectName(f"{name}_用户列表") - self.config = config - self.crypto = crypto self.name = name @@ -874,8 +841,8 @@ class MaaSettingBox(QWidget): """将本地数据库中的用户配置同步至GUI的用户管理界面""" # 读入本地数据库 - self.config.cur.execute("SELECT * FROM adminx WHERE True") - data = self.config.cur.fetchall() + Config.cur.execute("SELECT * FROM adminx WHERE True") + data = Config.cur.fetchall() # 处理部分模式调整 if operation == "read_only": @@ -946,15 +913,13 @@ class MaaSettingBox(QWidget): QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) elif j == 12: - if self.config.PASSWORD == "": + if Config.PASSWORD == "": item = QTableWidgetItem("******") item.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) else: - result = self.crypto.decryptx( - value, self.config.PASSWORD - ) + result = Crypto.decryptx(value, Config.PASSWORD) item = QTableWidgetItem(result) if result == "管理密钥错误": item.setFlags( @@ -1022,15 +987,13 @@ class MaaSettingBox(QWidget): QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) elif j == 12: - if self.config.PASSWORD == "": + if Config.PASSWORD == "": item = QTableWidgetItem("******") item.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) else: - result = self.crypto.decryptx( - value, self.config.PASSWORD - ) + result = Crypto.decryptx(value, Config.PASSWORD) item = QTableWidgetItem(result) if result == "管理密钥错误": item.setFlags( @@ -1094,9 +1057,7 @@ class MaaSettingBox(QWidget): if item.column() in [6, 7, 8]: # 关卡号 # 导入与应用特殊关卡规则 games = {} - with self.config.gameid_path.open( - mode="r", encoding="utf-8" - ) as f: + with Config.gameid_path.open(mode="r", encoding="utf-8") as f: gameids = f.readlines() for line in gameids: if ":" in line: @@ -1104,11 +1065,11 @@ class MaaSettingBox(QWidget): games[game_in.strip()] = game_out.strip() text = games.get(text, text) if item.column() == 11: # 密码 - text = self.crypto.encryptx(text) + text = Crypto.encryptx(text) # 保存至本地数据库 if text != "": - self.config.cur.execute( + Config.cur.execute( f"UPDATE adminx SET {self.user_column[self.userlist_simple_index.index(item.column())]} = ? WHERE mode = 'simple' AND uid = ?", (text, item.row()), ) @@ -1122,15 +1083,15 @@ class MaaSettingBox(QWidget): self.update_user_info("normal") return None if item.column() == 6: # 密码 - text = self.crypto.encryptx(text) + text = Crypto.encryptx(text) # 保存至本地数据库 if text != "": - self.config.cur.execute( + Config.cur.execute( f"UPDATE adminx SET {self.user_column[self.userlist_beta_index.index(item.column())]} = ? WHERE mode = 'beta' AND uid = ?", (text, item.row()), ) - self.config.db.commit() + Config.db.commit() # 同步一般用户信息更改到GUI self.update_user_info("normal") @@ -1156,7 +1117,7 @@ class MaaSettingBox(QWidget): # or ( # index == 0 # and not ( - # self.config.app_path + # Config.app_path # / f"data/MAAconfig/{self.user_mode_list[index]}/{row}/{column}/gui.json" # ).exists() # ) @@ -1173,14 +1134,14 @@ class MaaSettingBox(QWidget): # 服务器 if mode == 0 and column == "server": server_list = ["Official", "Bilibili"] - self.config.cur.execute( + Config.cur.execute( f"UPDATE adminx SET server = ? WHERE mode = 'simple' AND uid = ?", (server_list[index], row), ) # 其它(启用/禁用) elif index in [0, 1]: index_list = ["y", "n"] - self.config.cur.execute( + Config.cur.execute( f"UPDATE adminx SET {column} = ? WHERE mode = ? AND uid = ?", ( index_list[index], @@ -1188,7 +1149,7 @@ class MaaSettingBox(QWidget): row, ), ) - self.config.db.commit() + Config.db.commit() # 同步用户组件信息修改到GUI self.update_user_info("normal") @@ -1201,15 +1162,15 @@ class MaaSettingBox(QWidget): set_book = ["simple", self.user_list_simple.rowCount()] elif "高级用户列表" in self.pivot.currentRouteKey(): set_book = ["beta", self.user_list_beta.rowCount()] - self.config.cur.execute( + Config.cur.execute( "INSERT INTO adminx VALUES('新用户','手机号码(官服)/B站ID(B服)','Official',-1,'y','2000-01-01','1-7','-','-','n','n','n',?,'无',0,?,?)", ( - self.crypto.encryptx("未设置"), + Crypto.encryptx("未设置"), set_book[0], set_book[1], ), ) - self.config.db.commit(), + Config.db.commit(), # 同步新用户至GUI self.update_user_info("normal") @@ -1248,14 +1209,14 @@ class MaaSettingBox(QWidget): return None # 确认待删除用户信息 - self.config.cur.execute( + Config.cur.execute( "SELECT * FROM adminx WHERE mode = ? AND uid = ?", ( self.user_mode_list[mode], row, ), ) - data = self.config.cur.fetchall() + data = Config.cur.fetchall() choice = MessageBox( "确认", f"确定要删除用户 {data[0][0]} 吗?", @@ -1273,26 +1234,26 @@ class MaaSettingBox(QWidget): # 删除用户 if choice.exec(): # 删除所选用户 - self.config.cur.execute( + Config.cur.execute( "DELETE FROM adminx WHERE mode = ? AND uid = ?", ( self.user_mode_list[mode], row, ), ) - self.config.db.commit() + Config.db.commit() if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ).exists(): shutil.rmtree( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ) # 后续用户补位 for i in range(row + 1, current_numb): - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( i - 1, @@ -1300,16 +1261,16 @@ class MaaSettingBox(QWidget): i, ), ) - self.config.db.commit() + Config.db.commit() if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{i}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{i}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{i}" ) @@ -1350,7 +1311,7 @@ class MaaSettingBox(QWidget): if row == 0: return None - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( -1, @@ -1358,7 +1319,7 @@ class MaaSettingBox(QWidget): row, ), ) - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( row, @@ -1366,7 +1327,7 @@ class MaaSettingBox(QWidget): row - 1, ), ) - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( row - 1, @@ -1374,39 +1335,39 @@ class MaaSettingBox(QWidget): -1, ), ) - self.config.db.commit() + Config.db.commit() if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{-1}" ) if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row - 1}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row - 1}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ) if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{-1}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{-1}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row - 1}" ) @@ -1452,7 +1413,7 @@ class MaaSettingBox(QWidget): if row == current_numb - 1: return None - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( -1, @@ -1460,7 +1421,7 @@ class MaaSettingBox(QWidget): row, ), ) - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( row, @@ -1468,7 +1429,7 @@ class MaaSettingBox(QWidget): row + 1, ), ) - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( row + 1, @@ -1476,39 +1437,39 @@ class MaaSettingBox(QWidget): -1, ), ) - self.config.db.commit() + Config.db.commit() if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{-1}" ) if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row + 1}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row + 1}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ) if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{-1}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{-1}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row + 1}" ) @@ -1550,14 +1511,14 @@ class MaaSettingBox(QWidget): return None # 确认待切换用户信息 - self.config.cur.execute( + Config.cur.execute( "SELECT * FROM adminx WHERE mode = ? AND uid = ?", ( self.user_mode_list[mode], row, ), ) - data = self.config.cur.fetchall() + data = Config.cur.fetchall() mode_list = ["简洁", "高级"] choice = MessageBox( @@ -1576,15 +1537,15 @@ class MaaSettingBox(QWidget): # 切换用户 if choice.exec(): - self.config.cur.execute("SELECT * FROM adminx WHERE True") - data = self.config.cur.fetchall() + Config.cur.execute("SELECT * FROM adminx WHERE True") + data = Config.cur.fetchall() if mode == 0: current_numb = self.user_list_simple.rowCount() elif mode == 1: current_numb = self.user_list_beta.rowCount() # 切换所选用户 other_numb = len(data) - current_numb - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET mode = ?, uid = ? WHERE mode = ? AND uid = ?", ( self.user_mode_list[1 - mode], @@ -1593,20 +1554,20 @@ class MaaSettingBox(QWidget): row, ), ) - self.config.db.commit() + Config.db.commit() if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}" ).exists(): shutil.move( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{row}", - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[1 - mode]}/{other_numb}", ) # 后续用户补位 for i in range(row + 1, current_numb): - self.config.cur.execute( + Config.cur.execute( "UPDATE adminx SET uid = ? WHERE mode = ? AND uid = ?", ( i - 1, @@ -1614,16 +1575,16 @@ class MaaSettingBox(QWidget): i, ), ) - self.config.db.commit(), + Config.db.commit(), if ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{i}" ).exists(): ( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{i}" ).rename( - self.config.app_path + Config.app_path / f"config/MaaConfig/{self.name}/{self.user_mode_list[mode]}/{i - 1}" ) diff --git a/app/ui/queue_manager.py b/app/ui/queue_manager.py index 0ef3a4f..3e32909 100644 --- a/app/ui/queue_manager.py +++ b/app/ui/queue_manager.py @@ -53,8 +53,8 @@ import shutil uiLoader = QUiLoader() -from app.core import AppConfig, QueueConfig -from app.services import Notification +from app.core import Config +from app.services import Notify from .Widget import ( LineEditSettingCard, TimeEditSettingCard, @@ -66,24 +66,19 @@ class QueueManager(QWidget): def __init__( self, - config: AppConfig, - notify: Notification, parent=None, ): super().__init__(parent) self.setObjectName("调度队列") - self.config = config - self.notify = notify - setTheme(Theme.AUTO) layout = QVBoxLayout(self) self.tools = CommandBar() - self.queue_manager = QueueSettingBox(self.config, self) + self.queue_manager = QueueSettingBox(self) # 逐个添加动作 self.tools.addActions( @@ -119,11 +114,11 @@ class QueueManager(QWidget): index = len(self.queue_manager.search_queue()) + 1 qconfig.load( - self.config.app_path / f"config/QueueConfig/调度队列_{index}.json", - self.config.queue_config, + Config.app_path / f"config/QueueConfig/调度队列_{index}.json", + Config.queue_config, ) - self.config.clear_queue_config() - self.config.queue_config.save() + Config.clear_queue_config() + Config.queue_config.save() self.queue_manager.add_QueueSettingBox(index) self.queue_manager.switch_SettingBox(index) @@ -150,15 +145,11 @@ class QueueManager(QWidget): self.queue_manager.clear_SettingBox() - (self.config.app_path / f"config/QueueConfig/{name}.json").unlink() + (Config.app_path / f"config/QueueConfig/{name}.json").unlink() for queue in move_list: - if ( - self.config.app_path / f"config/QueueConfig/{queue[0]}.json" - ).exists(): - ( - self.config.app_path / f"config/QueueConfig/{queue[0]}.json" - ).rename( - self.config.app_path + if (Config.app_path / f"config/QueueConfig/{queue[0]}.json").exists(): + (Config.app_path / f"config/QueueConfig/{queue[0]}.json").rename( + Config.app_path / f"config/QueueConfig/调度队列_{int(queue[0][5:])-1}.json", ) @@ -179,15 +170,15 @@ class QueueManager(QWidget): self.queue_manager.clear_SettingBox() - (self.config.app_path / f"config/QueueConfig/调度队列_{index}.json").rename( - self.config.app_path / f"config/QueueConfig/调度队列_0.json", + (Config.app_path / f"config/QueueConfig/调度队列_{index}.json").rename( + Config.app_path / f"config/QueueConfig/调度队列_0.json", ) shutil.move( - str(self.config.app_path / f"config/QueueConfig/调度队列_{index-1}.json"), - str(self.config.app_path / f"config/QueueConfig/调度队列_{index}.json"), + str(Config.app_path / f"config/QueueConfig/调度队列_{index-1}.json"), + str(Config.app_path / f"config/QueueConfig/调度队列_{index}.json"), ) - (self.config.app_path / f"config/QueueConfig/调度队列_0.json").rename( - self.config.app_path / f"config/QueueConfig/调度队列_{index-1}.json", + (Config.app_path / f"config/QueueConfig/调度队列_0.json").rename( + Config.app_path / f"config/QueueConfig/调度队列_{index-1}.json", ) self.queue_manager.show_SettingBox(index - 1) @@ -208,14 +199,14 @@ class QueueManager(QWidget): self.queue_manager.clear_SettingBox() - (self.config.app_path / f"config/QueueConfig/调度队列_{index}.json").rename( - self.config.app_path / f"config/QueueConfig/调度队列_0.json", + (Config.app_path / f"config/QueueConfig/调度队列_{index}.json").rename( + Config.app_path / f"config/QueueConfig/调度队列_0.json", ) - (self.config.app_path / f"config/QueueConfig/调度队列_{index+1}.json").rename( - self.config.app_path / f"config/QueueConfig/调度队列_{index}.json", + (Config.app_path / f"config/QueueConfig/调度队列_{index+1}.json").rename( + Config.app_path / f"config/QueueConfig/调度队列_{index}.json", ) - (self.config.app_path / f"config/QueueConfig/调度队列_0.json").rename( - self.config.app_path / f"config/QueueConfig/调度队列_{index+1}.json", + (Config.app_path / f"config/QueueConfig/调度队列_0.json").rename( + Config.app_path / f"config/QueueConfig/调度队列_{index+1}.json", ) self.queue_manager.show_SettingBox(index + 1) @@ -233,11 +224,10 @@ class QueueManager(QWidget): class QueueSettingBox(QWidget): - def __init__(self, config: AppConfig, parent=None): + def __init__(self, parent=None): super().__init__(parent) self.setObjectName("调度队列管理") - self.config = config self.pivot = Pivot(self) self.stackedWidget = QStackedWidget(self) @@ -261,14 +251,14 @@ class QueueSettingBox(QWidget): queue_list = self.search_queue() qconfig.load( - self.config.app_path / "config/临时.json", - self.config.queue_config, + Config.app_path / "config/临时.json", + Config.queue_config, ) - self.config.clear_queue_config() + Config.clear_queue_config() for queue in queue_list: self.add_QueueSettingBox(int(queue[0][5:])) - if (self.config.app_path / "config/临时.json").exists(): - (self.config.app_path / "config/临时.json").unlink() + if (Config.app_path / "config/临时.json").exists(): + (Config.app_path / "config/临时.json").unlink() self.switch_SettingBox(index) @@ -284,9 +274,9 @@ class QueueSettingBox(QWidget): return None qconfig.load( - self.config.app_path + Config.app_path / f"config/QueueConfig/{self.script_list[index-1].objectName()}.json", - self.config.queue_config, + Config.queue_config, ) if if_change_pivot: @@ -302,17 +292,17 @@ class QueueSettingBox(QWidget): self.script_list.clear() self.pivot.clear() qconfig.load( - self.config.app_path / "config/临时.json", - self.config.queue_config, + Config.app_path / "config/临时.json", + Config.queue_config, ) - self.config.clear_queue_config() - if (self.config.app_path / "config/临时.json").exists(): - (self.config.app_path / "config/临时.json").unlink() + Config.clear_queue_config() + if (Config.app_path / "config/临时.json").exists(): + (Config.app_path / "config/临时.json").unlink() def add_QueueSettingBox(self, uid: int) -> None: """添加一个调度队列设置界面""" - maa_setting_box = QueueMemberSettingBox(self.config, uid, self) + maa_setting_box = QueueMemberSettingBox(uid, self) self.script_list.append(maa_setting_box) @@ -325,10 +315,8 @@ class QueueSettingBox(QWidget): queue_list = [] - if (self.config.app_path / "config/QueueConfig").exists(): - for json_file in (self.config.app_path / "config/QueueConfig").glob( - "*.json" - ): + if (Config.app_path / "config/QueueConfig").exists(): + for json_file in (Config.app_path / "config/QueueConfig").glob("*.json"): with json_file.open("r", encoding="utf-8") as f: info = json.load(f) queue_list.append([json_file.stem, info["QueueSet"]["Name"]]) @@ -338,13 +326,11 @@ class QueueSettingBox(QWidget): class QueueMemberSettingBox(QWidget): - def __init__(self, config: AppConfig, uid: int, parent=None): + def __init__(self, uid: int, parent=None): super().__init__(parent) self.setObjectName(f"调度队列_{uid}") - self.config = config - layout = QVBoxLayout() scrollArea = ScrollArea() @@ -353,10 +339,10 @@ class QueueMemberSettingBox(QWidget): content_widget = QWidget() content_layout = QVBoxLayout(content_widget) - self.queue_set = self.QueueSetSettingCard(self, self.config.queue_config) - self.time = self.TimeSettingCard(self, self.config.queue_config) - self.task = self.TaskSettingCard(self, self.config) - self.history = self.HistoryCard(self, self.config, f"调度队列_{uid}") + self.queue_set = self.QueueSetSettingCard(self) + self.time = self.TimeSettingCard(self) + self.task = self.TaskSettingCard(self) + self.history = self.HistoryCard(self, f"调度队列_{uid}") content_layout.addWidget(self.queue_set) content_layout.addWidget(self.time) @@ -372,13 +358,11 @@ class QueueMemberSettingBox(QWidget): class QueueSetSettingCard(HeaderCardWidget): - def __init__(self, parent=None, queue_config: QueueConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("队列设置") - self.queue_config = queue_config - Layout = QVBoxLayout() self.card_Name = LineEditSettingCard( @@ -386,13 +370,13 @@ class QueueMemberSettingBox(QWidget): FluentIcon.EDIT, "调度队列名称", "用于标识调度队列的名称", - self.queue_config.queueSet_Name, + Config.queue_config.queueSet_Name, ) self.card_Enable = SwitchSettingCard( FluentIcon.HOME, "状态", "调度队列状态", - self.queue_config.queueSet_Enabled, + Config.queue_config.queueSet_Enabled, ) Layout.addWidget(self.card_Name) @@ -402,13 +386,11 @@ class QueueMemberSettingBox(QWidget): class TimeSettingCard(HeaderCardWidget): - def __init__(self, parent=None, queue_config: QueueConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("定时设置") - self.queue_config = queue_config - widget_1 = QWidget() Layout_1 = QVBoxLayout(widget_1) widget_2 = QWidget() @@ -419,71 +401,71 @@ class QueueMemberSettingBox(QWidget): FluentIcon.STOP_WATCH, "定时 1", "", - self.queue_config.time_TimeEnabled_0, - self.queue_config.time_TimeSet_0, + Config.queue_config.time_TimeEnabled_0, + Config.queue_config.time_TimeSet_0, ) self.card_Time_1 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 2", "", - self.queue_config.time_TimeEnabled_1, - self.queue_config.time_TimeSet_1, + Config.queue_config.time_TimeEnabled_1, + Config.queue_config.time_TimeSet_1, ) self.card_Time_2 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 3", "", - self.queue_config.time_TimeEnabled_2, - self.queue_config.time_TimeSet_2, + Config.queue_config.time_TimeEnabled_2, + Config.queue_config.time_TimeSet_2, ) self.card_Time_3 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 4", "", - self.queue_config.time_TimeEnabled_3, - self.queue_config.time_TimeSet_3, + Config.queue_config.time_TimeEnabled_3, + Config.queue_config.time_TimeSet_3, ) self.card_Time_4 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 5", "", - self.queue_config.time_TimeEnabled_4, - self.queue_config.time_TimeSet_4, + Config.queue_config.time_TimeEnabled_4, + Config.queue_config.time_TimeSet_4, ) self.card_Time_5 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 6", "", - self.queue_config.time_TimeEnabled_5, - self.queue_config.time_TimeSet_5, + Config.queue_config.time_TimeEnabled_5, + Config.queue_config.time_TimeSet_5, ) self.card_Time_6 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 7", "", - self.queue_config.time_TimeEnabled_6, - self.queue_config.time_TimeSet_6, + Config.queue_config.time_TimeEnabled_6, + Config.queue_config.time_TimeSet_6, ) self.card_Time_7 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 8", "", - self.queue_config.time_TimeEnabled_7, - self.queue_config.time_TimeSet_7, + Config.queue_config.time_TimeEnabled_7, + Config.queue_config.time_TimeSet_7, ) self.card_Time_8 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 9", "", - self.queue_config.time_TimeEnabled_8, - self.queue_config.time_TimeSet_8, + Config.queue_config.time_TimeEnabled_8, + Config.queue_config.time_TimeSet_8, ) self.card_Time_9 = TimeEditSettingCard( FluentIcon.STOP_WATCH, "定时 10", "", - self.queue_config.time_TimeEnabled_9, - self.queue_config.time_TimeSet_9, + Config.queue_config.time_TimeEnabled_9, + Config.queue_config.time_TimeSet_9, ) Layout_1.addWidget(self.card_Time_0) @@ -503,20 +485,17 @@ class QueueMemberSettingBox(QWidget): class TaskSettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("任务队列") - self.config = config - self.queue_config = config.queue_config - Layout = QVBoxLayout() member_list = self.search_member() self.card_Member_1 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_1, + Config.queue_config.queue_Member_1, FluentIcon.APPLICATION, "任务实例 1", "第一个调起的脚本任务实例", @@ -524,7 +503,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_2 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_2, + Config.queue_config.queue_Member_2, FluentIcon.APPLICATION, "任务实例 2", "第二个调起的脚本任务实例", @@ -532,7 +511,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_3 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_3, + Config.queue_config.queue_Member_3, FluentIcon.APPLICATION, "任务实例 3", "第三个调起的脚本任务实例", @@ -540,7 +519,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_4 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_4, + Config.queue_config.queue_Member_4, FluentIcon.APPLICATION, "任务实例 4", "第四个调起的脚本任务实例", @@ -548,7 +527,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_5 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_5, + Config.queue_config.queue_Member_5, FluentIcon.APPLICATION, "任务实例 5", "第五个调起的脚本任务实例", @@ -556,7 +535,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_6 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_6, + Config.queue_config.queue_Member_6, FluentIcon.APPLICATION, "任务实例 6", "第六个调起的脚本任务实例", @@ -564,7 +543,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_7 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_7, + Config.queue_config.queue_Member_7, FluentIcon.APPLICATION, "任务实例 7", "第七个调起的脚本任务实例", @@ -572,7 +551,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_8 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_8, + Config.queue_config.queue_Member_8, FluentIcon.APPLICATION, "任务实例 8", "第八个调起的脚本任务实例", @@ -580,7 +559,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_9 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_9, + Config.queue_config.queue_Member_9, FluentIcon.APPLICATION, "任务实例 9", "第九个调起的脚本任务实例", @@ -588,7 +567,7 @@ class QueueMemberSettingBox(QWidget): member_list[1], ) self.card_Member_10 = NoOptionComboBoxSettingCard( - self.queue_config.queue_Member_10, + Config.queue_config.queue_Member_10, FluentIcon.APPLICATION, "任务实例 10", "第十个调起的脚本任务实例", @@ -615,8 +594,8 @@ class QueueMemberSettingBox(QWidget): member_list_name = ["禁用"] member_list_text = ["未启用"] - if (self.config.app_path / "config/MaaConfig").exists(): - for subdir in (self.config.app_path / "config/MaaConfig").iterdir(): + if (Config.app_path / "config/MaaConfig").exists(): + for subdir in (Config.app_path / "config/MaaConfig").iterdir(): if subdir.is_dir(): member_list_name.append(subdir.name) with (subdir / "config.json").open("r", encoding="utf-8") as f: @@ -632,15 +611,13 @@ class QueueMemberSettingBox(QWidget): class HistoryCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None, name: str = None): + def __init__(self, parent=None, name: str = None): super().__init__(parent) self.setTitle("历史运行记录") - self.config = config - self.text = TextBrowser() self.text.setMinimumHeight(300) - history = self.config.get_history(name) + history = Config.get_history(name) self.text.setPlainText(history["History"]) self.viewLayout.addWidget(self.text) diff --git a/app/ui/setting.py b/app/ui/setting.py index d130ec8..3236ad0 100644 --- a/app/ui/setting.py +++ b/app/ui/setting.py @@ -51,8 +51,8 @@ import requests uiLoader = QUiLoader() -from app.core import AppConfig, MainInfoBar -from app.services import Notification, CryptoHandler, SystemHandler +from app.core import Config, MainInfoBar +from app.services import Notify, Crypto, System from app.utils import Updater, version_text from .Widget import InputMessageBox, LineEditSettingCard @@ -61,21 +61,12 @@ class Setting(QWidget): def __init__( self, - config: AppConfig, - notify: Notification, - crypto: CryptoHandler, - system: SystemHandler, parent=None, ): super().__init__(parent) self.setObjectName("设置") - self.config = config - self.notify = notify - self.crypto = crypto - self.system = system - setTheme(Theme.AUTO) layout = QVBoxLayout() @@ -86,16 +77,16 @@ class Setting(QWidget): content_widget = QWidget() content_layout = QVBoxLayout(content_widget) - self.function = FunctionSettingCard(self, self.config) - self.start = StartSettingCard(self, self.config) - self.ui = UiSettingCard(self, self.config) - self.notification = NotifySettingCard(self, self.config) + self.function = FunctionSettingCard(self) + self.start = StartSettingCard(self) + self.ui = UiSettingCard(self) + self.notification = NotifySettingCard(self) self.security = SecuritySettingCard(self) - self.updater = UpdaterSettingCard(self, self.config) - self.other = OtherSettingCard(self, self.config) + self.updater = UpdaterSettingCard(self) + self.other = OtherSettingCard(self) - self.function.card_IfAllowSleep.checkedChanged.connect(self.system.set_Sleep) - self.start.card_IfSelfStart.checkedChanged.connect(self.system.set_SelfStart) + self.function.card_IfAllowSleep.checkedChanged.connect(System.set_Sleep) + self.start.card_IfSelfStart.checkedChanged.connect(System.set_SelfStart) self.security.card_changePASSWORD.clicked.connect(self.change_PASSWORD) self.updater.card_CheckUpdate.clicked.connect(self.get_update) self.other.card_Tips.clicked.connect(self.show_tips) @@ -117,7 +108,7 @@ class Setting(QWidget): def check_PASSWORD(self) -> None: """检查并配置管理密钥""" - if self.config.key_path.exists(): + if Config.key_path.exists(): return None while True: @@ -129,7 +120,7 @@ class Setting(QWidget): "密码", ) if choice.exec() and choice.input.text() != "": - self.crypto.get_PASSWORD(choice.input.text()) + Crypto.get_PASSWORD(choice.input.text()) break else: choice = MessageBox( @@ -146,8 +137,8 @@ class Setting(QWidget): """修改管理密钥""" # 获取用户信息 - self.config.cur.execute("SELECT * FROM adminx WHERE True") - data = self.config.cur.fetchall() + Config.cur.execute("SELECT * FROM adminx WHERE True") + data = Config.cur.fetchall() if len(data) == 0: @@ -168,7 +159,7 @@ class Setting(QWidget): ) if choice.exec() and choice.input.text() != "": # 修改管理密钥 - self.crypto.get_PASSWORD(choice.input.text()) + Crypto.get_PASSWORD(choice.input.text()) choice = MessageBox( "操作成功", "管理密钥修改成功", @@ -202,7 +193,7 @@ class Setting(QWidget): if choice.exec() and choice.input.text() != "": # 验证旧管理密钥 - if self.crypto.check_PASSWORD(choice.input.text()): + if Crypto.check_PASSWORD(choice.input.text()): PASSWORD_old = choice.input.text() # 获取新的管理密钥 @@ -217,7 +208,7 @@ class Setting(QWidget): if choice.exec() and choice.input.text() != "": # 修改管理密钥 - self.crypto.change_PASSWORD( + Crypto.change_PASSWORD( data, PASSWORD_old, choice.input.text() ) choice = MessageBox( @@ -261,7 +252,7 @@ class Setting(QWidget): """检查主程序版本更新,返回更新信息""" # 从本地版本信息文件获取当前版本信息 - with self.config.version_path.open(mode="r", encoding="utf-8") as f: + with Config.version_path.open(mode="r", encoding="utf-8") as f: version_current = json.load(f) main_version_current = list( map(int, version_current["main_version"].split(".")) @@ -297,7 +288,7 @@ class Setting(QWidget): """检查版本更新,调起文件下载进程""" # 从本地版本信息文件获取当前版本信息 - with self.config.version_path.open(mode="r", encoding="utf-8") as f: + with Config.version_path.open(mode="r", encoding="utf-8") as f: version_current = json.load(f) main_version_current = list( map(int, version_current["main_version"].split(".")) @@ -306,7 +297,7 @@ class Setting(QWidget): map(int, version_current["updater_version"].split(".")) ) # 检查更新器是否存在 - if not (self.config.app_path / "Updater.exe").exists(): + if not (Config.app_path / "Updater.exe").exists(): updater_version_current = [0, 0, 0, 0] # 从远程服务器获取最新版本信息 @@ -369,7 +360,7 @@ class Setting(QWidget): if updater_version_remote > updater_version_current: # 创建更新进程 self.updater = Updater( - self.config.app_path, + Config.app_path, "AUTO_MAA更新器", main_version_remote, updater_version_remote, @@ -392,7 +383,7 @@ class Setting(QWidget): """更新主程序""" subprocess.Popen( - str(self.config.app_path / "Updater.exe"), + str(Config.app_path / "Updater.exe"), shell=True, creationflags=subprocess.CREATE_NO_WINDOW, ) @@ -411,27 +402,25 @@ class Setting(QWidget): class FunctionSettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("功能") - self.config = config.global_config - Layout = QVBoxLayout() self.card_IfAllowSleep = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="启动时阻止系统休眠", content="仅阻止电脑自动休眠,不会影响屏幕是否熄灭", - configItem=self.config.function_IfAllowSleep, + configItem=Config.global_config.function_IfAllowSleep, ) self.card_IfSilence = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="静默模式", content="将各代理窗口置于后台运行,减少对前台的干扰", - configItem=self.config.function_IfSilence, + configItem=Config.global_config.function_IfSilence, ) # 添加各组到设置卡中 @@ -443,27 +432,25 @@ class FunctionSettingCard(HeaderCardWidget): class StartSettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("启动") - self.config = config.global_config - Layout = QVBoxLayout() self.card_IfSelfStart = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="开机时自动启动", content="将AUTO_MAA添加到开机启动项", - configItem=self.config.start_IfSelfStart, + configItem=Config.global_config.start_IfSelfStart, ) self.card_IfRunDirectly = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="启动后直接运行", content="启动AUTO_MAA后自动运行任务", - configItem=self.config.start_IfRunDirectly, + configItem=Config.global_config.start_IfRunDirectly, ) # 添加各组到设置卡中 @@ -477,27 +464,25 @@ class StartSettingCard(HeaderCardWidget): class UiSettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("界面") - self.config = config.global_config - Layout = QVBoxLayout() self.card_IfShowTray = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="显示托盘图标", content="常态显示托盘图标", - configItem=self.config.ui_IfShowTray, + configItem=Config.global_config.ui_IfShowTray, ) self.card_IfToTray = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="最小化到托盘", content="最小化时隐藏到托盘", - configItem=self.config.ui_IfToTray, + configItem=Config.global_config.ui_IfToTray, ) # 添加各组到设置卡中 @@ -509,23 +494,21 @@ class UiSettingCard(HeaderCardWidget): class NotifySettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("通知") - self.config = config - Layout = QVBoxLayout() self.card_IfPushPlyer = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="推送系统通知", content="推送系统级通知,不会在通知中心停留", - configItem=self.config.global_config.notify_IfPushPlyer, + configItem=Config.global_config.notify_IfPushPlyer, ) - self.card_SendMail = self.SendMailSettingCard(self, self.config) + self.card_SendMail = self.SendMailSettingCard(self) Layout.addWidget(self.card_IfPushPlyer) Layout.addWidget(self.card_SendMail) @@ -534,7 +517,7 @@ class NotifySettingCard(HeaderCardWidget): class SendMailSettingCard(ExpandGroupSettingCard): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__( FluentIcon.SETTING, "推送邮件通知", @@ -542,8 +525,6 @@ class NotifySettingCard(HeaderCardWidget): parent, ) - self.config = config.global_config - widget = QWidget() Layout = QVBoxLayout(widget) @@ -551,7 +532,7 @@ class NotifySettingCard(HeaderCardWidget): icon=FluentIcon.PAGE_RIGHT, title="推送邮件通知", content="是否启用邮件通知功能", - configItem=self.config.notify_IfSendMail, + configItem=Config.global_config.notify_IfSendMail, ) self.MailAddress = LineEditSettingCard( @@ -559,14 +540,14 @@ class NotifySettingCard(HeaderCardWidget): icon=FluentIcon.PAGE_RIGHT, title="邮箱地址", content="接收通知的邮箱地址", - configItem=self.config.notify_MailAddress, + configItem=Config.global_config.notify_MailAddress, ) self.card_IfSendErrorOnly = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="仅推送异常信息", content="仅在任务出现异常时推送通知", - configItem=self.config.notify_IfSendErrorOnly, + configItem=Config.global_config.notify_IfSendErrorOnly, ) Layout.addWidget(self.card_IfSendMail) @@ -603,20 +584,18 @@ class SecuritySettingCard(HeaderCardWidget): class UpdaterSettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("更新") - self.config = config.global_config - Layout = QVBoxLayout() self.card_IfAutoUpdate = SwitchSettingCard( icon=FluentIcon.PAGE_RIGHT, title="自动检查更新", content="将在启动时自动检查AUTO_MAA是否有新版本", - configItem=self.config.update_IfAutoUpdate, + configItem=Config.global_config.update_IfAutoUpdate, ) self.card_CheckUpdate = PushSettingCard( @@ -634,13 +613,11 @@ class UpdaterSettingCard(HeaderCardWidget): class OtherSettingCard(HeaderCardWidget): - def __init__(self, parent=None, config: AppConfig = None): + def __init__(self, parent=None): super().__init__(parent) self.setTitle("其他") - self.config = config.global_config - Layout = QVBoxLayout() self.card_Tips = PushSettingCard( diff --git a/app/utils/Updater.py b/app/utils/Updater.py index 32fb829..a697169 100644 --- a/app/utils/Updater.py +++ b/app/utils/Updater.py @@ -176,7 +176,7 @@ class UpdateProcess(QThread): elif self.name == "AUTO_MAA主程序": version_info["main_version"] = ".".join(map(str, self.main_version)) with open(self.version_path, "w", encoding="utf-8") as f: - json.dump(version_info, f, indent=4) + json.dump(version_info, f, ensure_ascii=False, indent=4) # 主程序更新完成后打开AUTO_MAA if self.name == "AUTO_MAA主程序": diff --git a/app/utils/__pycache__/Updater.cpython-312.pyc b/app/utils/__pycache__/Updater.cpython-312.pyc index 39855a6..3c6844e 100644 Binary files a/app/utils/__pycache__/Updater.cpython-312.pyc and b/app/utils/__pycache__/Updater.cpython-312.pyc differ diff --git a/config/MaaConfig/脚本_1/Default/gui.json b/config/MaaConfig/脚本_1/Default/gui.json index 4a39db8..8930816 100644 --- a/config/MaaConfig/脚本_1/Default/gui.json +++ b/config/MaaConfig/脚本_1/Default/gui.json @@ -23,8 +23,8 @@ "Connect.AdbLiteEnabled": "False", "Connect.AdbPath": "C:\\Program Files\\Netease\\MuMu Player 12\\shell\\adb.exe", "Connect.AdbReplaced": "False", - "Connect.Address": "127.0.0.1:16448", - "Connect.AddressHistory": "[\"127.0.0.1:16448\",\"127.0.0.1:16416\",\"127.0.0.1:16384\"]", + "Connect.Address": "127.0.0.1:16416", + "Connect.AddressHistory": "[\"127.0.0.1:16416\",\"127.0.0.1:16448\",\"127.0.0.1:16384\"]", "Connect.AllowADBHardRestart": "True", "Connect.AllowADBRestart": "True", "Connect.AlwaysAutoDetect": "False", @@ -78,13 +78,14 @@ "GUI.Placement": "{\"Length\":44,\"Flags\":0,\"ShowCmd\":1,\"MinPosition\":{\"X\":-1,\"Y\":-1},\"MaxPosition\":{\"X\":-1,\"Y\":-1},\"NormalPosition\":{\"Left\":680,\"Top\":314,\"Right\":1880,\"Bottom\":1214}}", "GUI.Placement.Load": "True", "GUI.Placement.SaveOnClosing": "True", - "GUI.UseAlternateStage": "True", + "GUI.UseAlternateStage": "False", "GUI.UseLogItemDateFormat": "False", + "GUI.UseTray": "True", "GUI.WindowTitlePrefix": "", "Guide.StepIndex": "4", "Infrast.ContinueTraining": "True", "Infrast.Control.IsChecked": "True", - "Infrast.CustomInfrastEnabled": "True", + "Infrast.CustomInfrastEnabled": "False", "Infrast.CustomInfrastFile": "D:\\AUTO\\MAA\\合成玉排班.json", "Infrast.CustomInfrastPlanIndex": "2", "Infrast.CustomInfrastPlanShowInFightSettings": "False", @@ -118,10 +119,10 @@ "MainFunction.Drops.ItemName": "不选择", "MainFunction.Drops.Quantity": "5", "MainFunction.InverseMode": "False", - "MainFunction.PostActions": "0", + "MainFunction.PostActions": "12", "MainFunction.Series.Quantity": "6", - "MainFunction.Stage1": "SK-5", - "MainFunction.Stage2": "1-7", + "MainFunction.Stage1": "1-7", + "MainFunction.Stage2": "", "MainFunction.Stage3": "", "MainFunction.TimesLimited": "False", "MainFunction.TimesLimited.Quantity": "5", @@ -137,7 +138,7 @@ "Mall.CreditVisitFriendsEnabled": "True", "Mall.CreditVisitOnceADay": "True", "Mall.CreidtReserveMaxCredit": "False", - "Mall.LastCreditVisitFriendsTime": "2024/10/23 00:00:00", + "Mall.LastCreditVisitFriendsTime": "2025/01/01 00:00:00", "Mission.ReceiveAward": "True", "Mission.ReceiveFreeRecruit": "True", "Mission.ReceiveMail": "True", @@ -177,7 +178,7 @@ "Roguelike.CoreChar": "", "Roguelike.DeepExplorationAutoIterate": "False", "Roguelike.DeploymentWithPause": "False", - "Roguelike.Difficulty": "0", + "Roguelike.Difficulty": "2", "Roguelike.ExitAtFinalBoss": "False", "Roguelike.InvestmentEnabled": "True", "Roguelike.InvestmentEnterSecondFloor": "True", @@ -195,7 +196,7 @@ "Roguelike.RoguelikeExpectedCollapsalParadigms": "", "Roguelike.RoguelikeOnlyStartWithEliteTwo": "False", "Roguelike.RoguelikeStartWithEliteTwo": "False", - "Roguelike.RoguelikeTheme": "Phantom", + "Roguelike.RoguelikeTheme": "Sarkaz", "Roguelike.RoguelikeUseSupportUnit": "False", "Roguelike.Roles": "", "Roguelike.Squad": "", @@ -209,7 +210,7 @@ "Start.BlockSleepWithScreenOn": "True", "Start.ClientType": "Official", "Start.CopilotWithScript": "False", - "Start.EmulatorAddCommand": "-v 2", + "Start.EmulatorAddCommand": "-v 1", "Start.EmulatorPath": "C:\\Program Files\\Netease\\MuMu Player 12\\shell\\MuMuPlayer.exe", "Start.EmulatorWaitSeconds": "30", "Start.EndsWithScript": "", @@ -221,10 +222,10 @@ "Start.StartEmulator": "True", "Start.StartsWithScript": "", "TaskQueue.AutoRoguelike.IsChecked": "False", - "TaskQueue.Base.IsChecked": "False", - "TaskQueue.Combat.IsChecked": "False", - "TaskQueue.Mall.IsChecked": "False", - "TaskQueue.Mission.IsChecked": "False", + "TaskQueue.Base.IsChecked": "True", + "TaskQueue.Combat.IsChecked": "True", + "TaskQueue.Mall.IsChecked": "True", + "TaskQueue.Mission.IsChecked": "True", "TaskQueue.Order.AutoRoguelike": "6", "TaskQueue.Order.Base": "2", "TaskQueue.Order.Combat": "3", @@ -236,8 +237,8 @@ "TaskQueue.Order.WakeUp": "0", "TaskQueue.Reclamation.IsChecked": "False", "TaskQueue.ReclamationAlgorithm2.IsChecked": "False", - "TaskQueue.Recruiting.IsChecked": "False", - "TaskQueue.WakeUp.IsChecked": "False", + "TaskQueue.Recruiting.IsChecked": "True", + "TaskQueue.WakeUp.IsChecked": "True", "VersionUpdate.AutoDownloadUpdatePackage": "True", "VersionUpdate.AutoInstallUpdatePackage": "True", "VersionUpdate.body": "## v5.6.0-beta.2\n\n### 新增 | New\n\n* 外部通知支持多选 (#10395) @ABA2396\n* add Qmsg notification (#10358) @octopusYan\n* 允许手动指定WPFGUI中干员名称显示语言 (#10310) @ABA2396 @Manicsteiner\n* GetLocalizedNames for Infrast and Copilot output (#10335) @Constrat\n* Reclamation for YostarJP (#10414) @Manicsteiner\n* 生息演算添加沙中之火选择项 @ABA2396\n* 适配「词祭」界面主题 (#10331) @Constrat @ManicSteiner @HX3N @SherkeyXD\n\n### 改进 | Improved\n\n* 全肉鸽招募适配娜仁图亚、艾拉 (#10385) @Daydreamer114\n* Mumu截图增强路径清空时不再检查路径是否存在 @status102\n* duplicates templates from I.S. (#10376) @Constrat\n* 优化外部通知界面显示 (#10363) @ABA2396\n* 更新 bug issue 模板 (#10357) @Rbqwow\n* 重构 OperBox 输出与显示 (#10320) @ABA2396\n* 重构定时器和重启询问 (#10078) @ABA2396\n* Win10以上系统在退出时Wpf不再清除Toast (#10307) @status102\n* 第一次启动时默认不勾选肉鸽和生息演算 @ABA2396\n* 优化动编队日志输出 @ABA2396\n* 优化生息演算 (#10411) @Alan-Charred @status102 @ABA2396\n\n### 修复 | Fix\n\n* FC rerun navigation fix EN @Constrat\n* 生息演算主题读取配置错误 @ABA2396\n* 萨卡兹肉鸽多选招募券模板错误 @ABA2396\n* 肉鸽编队检测在未触底时返回 true (#10396) @Alan-Charred\n* DoDragDrop 拖动操作已在进行中 (#10368) @ABA2396\n* insert delay after SquadConfirm @Constrat\n* 使用匹配后偏移代替每日任务 @status102\n* add ocrReplace for JP \"Reclamation2CopiousCoppice\" (#10362) @Daydreamer114\n* 勾选启动MAA后直接最小化后点击隐藏托盘图标后无法显示MAA @ABA2396\n* add delay after selecting clue @Constrat\n* SL 导航错误 @ABA2396\n* 修复调试版本判断条件 @SherkeyXD\n* 多配置下公告和更新日志显示异常 @ABA2396\n* 修复保全战斗在core干员重复时只会放1次bug (#10306) @status102\n* ProxyType 重启不生效 @ABA2396\n* EN needs templates for clue exchange the number font is different, score too low @Constrat\n* sarkaz 仓库识别错误 @ABA2396\n\n### 文档 | Docs\n\n* 贡献者头像添加 105 上限 (#10351) @MistEO\n\n### 其他 | Other\n\n* `std::ranges::views::join` with LLVM clang 16 on darwin (#10309) @Cryolitia\n* impossiblity of fetch-depth modification. reverting + generic perfs @Constrat\n* rev-list instead of rev-parse @Constrat\n* revert to simple if @Constrat\n* fetching depth 0 @Constrat\n* roi 错误 @ABA2396\n* remove \"\" in nightly fix #10308 @Constrat\n* 生息演算2刷开局清空编队干员 (#10359) @Daydreamer114\n* 重构 FightSettingsUserControl (#10407) @ABA2396\n* CopilotViewModel (#10099) @Manicsteiner\n* git blame ignore @Constrat\n* 优化界面显示 @ABA2396\n* smoking-test中肉鸽参数更新 @SherkeyXD\n* 使用变换后的图像进行技能按钮识别 (#10293) @horror-proton\n* OTA打包时对跳过的版本做删除处理 (#10020) @SherkeyXD\n* 公招错误时保存截图 @zzyyyl\n* 调用PowerManagement.Shutdown();后再次调用Bootstrapper.Shutdown(); @ABA2396\n* 关机前尝试保存配置 @ABA2396\n* 调整令牌关闭强度 @ABA2396\n* 迁移公告相关配置 (#10399) @status102\n* bump maa-cli to 0.4.12 (#10390) @wangl-cc\n* 调整 check link 提示样式 @ABA2396\n* 对comment中的未知链接进行提醒 (#10379) @IzakyL @ABA2396\n* update ignore templates @Constrat\n* 获取任务端口无效时不进行轮询 (#10321) @ABA2396\n* use CsWin32 source generator instead of random pinvoke library (#10361) @dantmnf\n* 删除子模块 @ABA2396\n* remove MaaDeps submodule (#10354) @dantmnf\n* RoguelikeRoutingTaskPlugin.h missing VS22 filter @Constrat\n* bump zzyyyl/issue-checker from 1.8 to 1.9 @zzyyyl\n* 公招识别拥有全干员时不显示未拥有干员数量 @ABA2396\n* YostarJP ocr fix @Manicsteiner\n* JP ZH-TW GPU option & reclamation translation @Manicsteiner\n* KR GpuDeprecated translation @HX3N\n* fix WPF Warning @SherkeyXD\n* 修改过时的Binding方法 @SherkeyXD\n* YostarJP FC navigation (#10316) @Manicsteiner\n* 整理 tasks.json 中记录的肉鸽插件参数 (#10290) @Alan-Charred\n* clearout git blame @Constrat\n* MuMu12EmulatorPath Placeholder 添加示例提示 @ABA2396\n* remove last checked commit @Constrat\n* auto blame ignore @github-actions[bot]\n* git blame added styling commits (#10283) @Constrat\n* smoking-test添加领取奖励的测试 @SherkeyXD\n* 移除tasks中的默认值 @SherkeyXD\n\n**Full Changelog**: [v5.6.0-beta.1 -> v5.6.0-beta.2](https://github.com/MaaAssistantArknights/MaaAssistantArknights/compare/v5.6.0-beta.1...v5.6.0-beta.2)\n", @@ -266,9 +267,9 @@ "GUI.LastBuyWineTime": "2024/04/15 00:00:00", "GUI.Localization": "zh-cn", "GUI.LogItemDateFormatString": "HH:mm:ss", - "GUI.MinimizeToTray": "False", + "GUI.MinimizeToTray": "True", "GUI.OperNameLanguage": "OperNameLanguageMAA", - "GUI.Placement": "{\"Length\":44,\"Flags\":0,\"ShowCmd\":1,\"MinPosition\":{\"X\":-1,\"Y\":-1},\"MaxPosition\":{\"X\":-1,\"Y\":-1},\"NormalPosition\":{\"Left\":512,\"Top\":296,\"Right\":1712,\"Bottom\":1196}}", + "GUI.Placement": "{\"Length\":44,\"Flags\":0,\"ShowCmd\":1,\"MinPosition\":{\"X\":-1,\"Y\":-1},\"MaxPosition\":{\"X\":-1,\"Y\":-1},\"NormalPosition\":{\"Left\":934,\"Top\":297,\"Right\":2134,\"Bottom\":1197}}", "GUI.Placement.Load": "True", "GUI.Placement.SaveOnClosing": "True", "GUI.SoberLanguage": "zh-cn", @@ -278,8 +279,8 @@ "HotKeys": "{\"ShowGui\":{\"Key\":56,\"Modifiers\":7}}", "Roguelike.RoguelikeStartWithSelectList": "Roguelike@LastReward Roguelike@LastReward4 Sarkaz@Roguelike@LastReward5", "Start.MinimizeDirectly": "False", - "Start.OpenEmulatorAfterLaunch": "False", - "Start.RunDirectly": "False", + "Start.OpenEmulatorAfterLaunch": "True", + "Start.RunDirectly": "True", "Timer.CustomConfig": "False", "Timer.ForceScheduledStart": "False", "Timer.ShowWindowBeforeForceScheduledStart": "False", @@ -318,12 +319,12 @@ "VersionUpdate.AllowNightlyUpdates": "False", "VersionUpdate.AutoDownloadUpdatePackage": "True", "VersionUpdate.AutoInstallUpdatePackage": "True", - "VersionUpdate.body": "## v5.12.3\n\n### 停不下来了 | Highlight\n\n* Base navigation fixes for the overseas clients\n\n### 新增 | New\n\n* 繁中服更新活動導航\"懷黍離\" (#11592) @XuQingTW\n\n### 修复 | Fix\n\n* 繁中服-生息演算中,完成生存週期畫面、大地圖畫面卡住 (#11649) @momomochi987\n* 繁中服 生息演算讀檔畫面卡住 (#11646) @momomochi987\n* 基建修复4 识别不到缩小状态下的后两个宿舍 @ABA2396\n* 38c8dd8 68357b9 modified base tasks in Official. Global needs custom ROI to work @Constrat\n* 380bf68 modified Base Infrast Siege for all clients. Reverting for global and co. @Constrat\n\n### 文档 | Docs\n\n* README 移除 MaaX,更换前端仓库地址 (#11636) @Rbqwow\n\n### 其他 | Other\n\n* 補上繁中服的加工站、訓練室相關內容 (#11648) @momomochi987\n* 调整基建宿舍阈值 @ABA2396\n* 调整基建发电站阈值 @ABA2396\n\n**Full Changelog**: [v5.12.2 -> v5.12.3](https://github.com/MaaAssistantArknights/MaaAssistantArknights/compare/v5.12.2...v5.12.3)\n", + "VersionUpdate.body": "## v5.12.0-beta.1\n\n### 真的没有摸鱼吗 | Highlight\n\n* 添加了种子存钱的功能,在选择 **萨卡兹** 主题,**刷源石锭** 模式,**点刺成锭分队** or **后勤分队** 时,高级设置中会出现 **启用种子刷钱(美愿)** 选项。\n* 种子固定为存钱种,若使用后勤存钱,请确保解锁美愿。种子难度为 6 难,由于难度设置仍然生效,可设为 “当前” 或 16 难(若有需要)。\n* 公招选择 **手动确认 1/5/6 星** 后,若出现 1/5/6 星,将不会计数,继续在下一个招募格内招募。\n\n#### 其他\n\n* 【**萨卡兹的无终奇语**】 【**内容拓展·二**】的资源内容暂时没有更新,在新增关卡中会出现 “关卡识别错误” 的情况,可能会尽快修复。\n* 新增了部分导航,改进了肉鸽流程\n* 修复博朗台模式等待异常\n* 修复了一些已知问题\n\n### 新增 | New\n\n* 繁中服「源石塵行動」復刻活動導航 @momomochi987\n* 点刺、后勤种子存钱 (#11521) @Daydreamer114 @ABA2396\n* 肉鸽满级自动停止选项 (#11466) @BxFS @Constrat @momomochi987 @status102\n* 为肉鸽开始探索添加 cd 识别 (#11443) @Daydreamer114\n* 萨卡兹肉鸽冰川期作战策略 @Daydreamer114\n* 萨卡兹内容拓展II点刺进入商店获得构想 (#11509) @Daydreamer114\n* 不自动招募1/5/6星干员时,不计入最大确认招募次数 (#11380) @Roland125 @horror-proton\n* 干员识别排除当前客户端未出干员 @ABA2396\n* 肉鸽开局干员列表排除当前客户端未出干员 @ABA2396\n\n### 改进 | Improved\n\n* 新增投掷手干员组并调整优先级 @Daydreamer114\n* 优化傀影肉鸽雪山上的来客ew部署 (#11195) @Daydreamer114\n\n### 修复 | Fix\n\n* 肉鸽烧热水没烧出来会从预设难度开始,而不是返回n0 @ABA2396\n* 删除傀影肉鸽远方来客意义不明的撤退 (#11194) @Daydreamer114\n* 博朗台计算等待时间失败数据处理 @status102\n* 修正nothing to select情况下的判断逻辑 @Roland125\n* update Collect Rewards template for EN fix #11485 @Constrat\n* tw OcrReplace 肉鸽招募助战 (#11487) @Saratoga-Official\n* 繁中服作戰失敗畫面卡住 (#11479) @momomochi987\n* InitialDrop.png更新 @Constrat @BxFS\n* txwy duplicates in tasks.json @Constrat\n* 更新 \"视相\" 主题后未关闭退出基建弹窗时无法回到主界面 @ABA2396\n* `手动输入关卡名` 与 `使用剩余理智` 选项无法保存 @ABA2396\n\n### 文档 | Docs\n\n* 肉鸽辅助协议文档翻译 (#11360) @Windsland52\n* 为肉鸽参数 start_with_seed 添加文档 (#11531) @Daydreamer114\n\n### 其他 | Other\n\n* manual recursion + robocopy for smoke-testing (#11458) @Constrat\n* implement cache for smoke-test (#11457) @Constrat\n* Release 模式下,如文件夹中包含 DEBUG.txt 也会输出 DBG 日志 (#11496) @ABA2396\n* ProcessTask的Action 新增 Input (#11521) @Daydreamer114 @ABA2396\n* increase fetch depth for release nightly-ota to generate tags (might need successive increases) @Constrat\n* delay and retry downloads on resource updater (#11504) @Constrat\n* use read/write secret to delete cache on pr merge @Constrat\n* checkout depth for nightly ota @Constrat\n* 移动企鹅物流及一图流上报设置 至 运行设置 @status102\n* Translations update from MAA Weblate (#11524) @AlisaAkiron\n* ignore blame for e3d63894b28b2ef5e2405e144a32a6981de5e1b2 oxipng optimization @Constrat\n* disable link checker in issues and PRs (#11506) @Constrat\n* use API for cache-deletion @Constrat\n* 移除不再使用的代码 for 最小化启动模拟器 @status102\n* move `push tag` later in the workflow in case or errors (#11480) @Constrat\n* 上报添加 User-Agent @ABA2396\n* 修改上报抬头 @ABA2396\n* Use %B to consider header for skip changelog @Constrat\n* try setup dotnet cache @Constrat\n* EN duplicates in tasks.json + SSS Buffs @Constrat\n* YostarJP phantom roguelike game pass, SSS#6 (#11473) @Manicsteiner\n* battle_data 未实装干员添加字段提示 @ABA2396\n* 别用 1234567890ABCDEF 去连模拟器了 @ABA2396\n* Revert \"refactor: move resource copy to test script\" @Constrat\n* `启动 MAA 后直接运行` 和 `启动 MAA 后自动开启模拟器` 改为独立配置 @ABA2396\n* 只有一个配置的时候不显示 `此选项页为全局配置` @ABA2396\n* 当前配置不存在时尝试读取全局配置 @ABA2396\n* Config序列化参数不转义中文 @status102\n\n**Full Changelog**: [v5.11.1 -> v5.12.0-beta.1](https://github.com/MaaAssistantArknights/MaaAssistantArknights/compare/v5.11.1...v5.12.0-beta.1)\n", "VersionUpdate.doNotShowUpdate": "False", "VersionUpdate.HasAcknowledgedNightlyWarning": "False", "VersionUpdate.isfirstboot": "False", - "VersionUpdate.name": "v5.12.3", - "VersionUpdate.package": "MAAComponent-OTA-v5.12.2_v5.12.3-win-x64.zip", + "VersionUpdate.name": "v5.12.0-beta.1", + "VersionUpdate.package": "", "VersionUpdate.Proxy": "127.0.0.1:26561", "VersionUpdate.ProxyType": "http", "VersionUpdate.ResourceApi": "https://maa-ota.annangela.cn/MaaAssistantArknights/MaaAssistantArknights/", diff --git a/config/MaaConfig/脚本_1/config.json b/config/MaaConfig/脚本_1/config.json index 1f6c6ef..9feb341 100644 --- a/config/MaaConfig/脚本_1/config.json +++ b/config/MaaConfig/脚本_1/config.json @@ -1,7 +1,7 @@ { "MaaSet": { "Name": "12332", - "Path": "D:/AUTO/MAA_for_AUTO" + "Path": "D:/AUTO/MAA" }, "RunSet": { "AnnihilationTimeLimit": 40, diff --git a/config/QueueConfig/调度队列_1.json b/config/QueueConfig/调度队列_1.json index 5cc7aa7..64c4d10 100644 --- a/config/QueueConfig/调度队列_1.json +++ b/config/QueueConfig/调度队列_1.json @@ -30,7 +30,7 @@ "TimeEnabled_7": false, "TimeEnabled_8": false, "TimeEnabled_9": false, - "TimeSet_0": "17:54", + "TimeSet_0": "20:33", "TimeSet_1": "01:00", "TimeSet_2": "00:00", "TimeSet_3": "01:00", diff --git a/config/config.json b/config/config.json index 6611c5e..6ca3d4c 100644 --- a/config/config.json +++ b/config/config.json @@ -1,7 +1,7 @@ { "Function": { "BossKey": "", - "IfAllowSleep": true, + "IfAllowSleep": false, "IfSilence": false }, "Notify": { @@ -22,7 +22,7 @@ "IfShowTray": false, "IfToTray": false, "MainIndex": 0, - "location": "207x195", + "location": "100x100", "maximized": false, "size": "1200x700" }, diff --git a/config/history.json b/config/history.json index 05f7fda..526f1fa 100644 --- a/config/history.json +++ b/config/history.json @@ -1,18 +1,18 @@ { - "\u811a\u672c_1": { - "History": "\u4efb\u52a1\u5f00\u59cb\u65f6\u95f4\uff1a2025-01-25 17:49:28\uff0c\u7ed3\u675f\u65f6\u95f4\uff1a2025-01-25 17:50:50\n\u5df2\u5b8c\u6210\u6570\uff1a0\uff0c\u672a\u5b8c\u6210\u6570\uff1a1\n\n\u4ee3\u7406\u672a\u6210\u529f\u7684\u7528\u6237\uff1a\n\u65b0\u7528\u6237\n", + "脚本_1": { + "History": "任务开始时间:2025-01-25 17:49:28,结束时间:2025-01-25 17:50:50\n已完成数:0,未完成数:1\n\n代理未成功的用户:\n新用户\n", "Time": "2025-01-25 17:49:28" }, - "\u8c03\u5ea6\u961f\u5217_2": { + "调度队列_2": { "Time": "2025-01-24 19:35:19", - "History": "\u4efb\u52a1\u540d\u79f0\uff1a\u811a\u672c_1\uff0c\u4efb\u52a1\u5f00\u59cb\u65f6\u95f4\uff1a2025-01-24 19:35:19\uff0c\u7ed3\u675f\u65f6\u95f4\uff1a2025-01-24 19:36:21\n\u5df2\u5b8c\u6210\u6570\uff1a0\uff0c\u672a\u5b8c\u6210\u6570\uff1a1\n\n\u4ee3\u7406\u672a\u6210\u529f\u7684\u7528\u6237\uff1a\n\u65b0\u7528\u6237\n\n" + "History": "任务名称:脚本_1,任务开始时间:2025-01-24 19:35:19,结束时间:2025-01-24 19:36:21\n已完成数:0,未完成数:1\n\n代理未成功的用户:\n新用户\n\n" }, - "\u811a\u672c_2": { - "History": "\u4efb\u52a1\u5f00\u59cb\u65f6\u95f4\uff1a2025-01-25 17:54:26\uff0c\u7ed3\u675f\u65f6\u95f4\uff1a2025-01-25 17:54:37\n\u5df2\u5b8c\u6210\u6570\uff1a0\uff0c\u672a\u5b8c\u6210\u6570\uff1a1\n\n\u4ee3\u7406\u672a\u6210\u529f\u7684\u7528\u6237\uff1a\n\u65b0\u7528\u6237\n", - "Time": "2025-01-25 17:54:26" + "脚本_2": { + "History": "任务开始时间:2025-01-26 07:56:52,结束时间:2025-01-26 07:56:56\n已完成数:0,未完成数:1\n\n代理未成功的用户:\n新用户\n", + "Time": "2025-01-26 07:56:52" }, - "\u8c03\u5ea6\u961f\u5217_1": { - "Time": "2025-01-25 17:54:26", - "History": "\u4efb\u52a1\u540d\u79f0\uff1a\u811a\u672c_2\uff0c\u4efb\u52a1\u5f00\u59cb\u65f6\u95f4\uff1a2025-01-25 17:54:26\uff0c\u7ed3\u675f\u65f6\u95f4\uff1a2025-01-25 17:54:37\n \u5df2\u5b8c\u6210\u6570\uff1a0\uff0c\u672a\u5b8c\u6210\u6570\uff1a1\n \n \u4ee3\u7406\u672a\u6210\u529f\u7684\u7528\u6237\uff1a\n \u65b0\u7528\u6237\n \n" + "调度队列_1": { + "Time": "2025-01-26 07:56:52", + "History": "任务名称:脚本_2,任务开始时间:2025-01-26 07:56:52,结束时间:2025-01-26 07:56:56\n 已完成数:0,未完成数:1\n \n 代理未成功的用户:\n 新用户\n \n" } } \ No newline at end of file diff --git a/debug/AUTO_MAA.log b/debug/AUTO_MAA.log index c326022..ee52458 100644 --- a/debug/AUTO_MAA.log +++ b/debug/AUTO_MAA.log @@ -3680,3 +3680,1022 @@ 2025-01-25 17:54:57.712 | DEBUG | [] 2025-01-25 17:54:58.714 | DEBUG | [] 2025-01-25 17:54:59.714 | DEBUG | [] +2025-01-25 18:09:40.335 | INFO | 日志记录器初始化完成 +2025-01-25 18:09:40.335 | INFO | 配置类初始化完成 +2025-01-25 18:09:40.335 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:09:40.764 | INFO | 日志记录器初始化完成 +2025-01-25 18:09:40.765 | INFO | 配置类初始化完成 +2025-01-25 18:09:40.765 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:09:40.764 | INFO | 日志记录器初始化完成 +2025-01-25 18:09:40.765 | INFO | 配置类初始化完成 +2025-01-25 18:09:40.765 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:09:42.324 | DEBUG | [] +2025-01-25 18:09:42.324 | DEBUG | [] +2025-01-25 18:09:43.324 | DEBUG | [] +2025-01-25 18:09:43.324 | DEBUG | [] +2025-01-25 18:09:44.325 | DEBUG | [] +2025-01-25 18:09:44.325 | DEBUG | [] +2025-01-25 18:09:45.325 | DEBUG | [] +2025-01-25 18:09:45.325 | DEBUG | [] +2025-01-25 18:09:46.325 | DEBUG | [] +2025-01-25 18:09:46.325 | DEBUG | [] +2025-01-25 18:09:47.325 | DEBUG | [] +2025-01-25 18:09:47.325 | DEBUG | [] +2025-01-25 18:16:01.090 | INFO | 日志记录器初始化完成 +2025-01-25 18:16:01.091 | INFO | 配置类初始化完成 +2025-01-25 18:16:01.091 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:16:01.509 | INFO | 日志记录器初始化完成 +2025-01-25 18:16:01.509 | INFO | 配置类初始化完成 +2025-01-25 18:16:01.510 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:16:01.509 | INFO | 日志记录器初始化完成 +2025-01-25 18:16:01.509 | INFO | 配置类初始化完成 +2025-01-25 18:16:01.510 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:16:03.135 | DEBUG | [] +2025-01-25 18:16:03.135 | DEBUG | [] +2025-01-25 18:16:04.136 | DEBUG | [] +2025-01-25 18:16:04.136 | DEBUG | [] +2025-01-25 18:16:05.135 | DEBUG | [] +2025-01-25 18:16:05.135 | DEBUG | [] +2025-01-25 18:16:06.135 | DEBUG | [] +2025-01-25 18:16:06.135 | DEBUG | [] +2025-01-25 18:16:07.135 | DEBUG | [] +2025-01-25 18:16:07.135 | DEBUG | [] +2025-01-25 18:16:08.135 | DEBUG | [] +2025-01-25 18:16:08.135 | DEBUG | [] +2025-01-25 18:16:09.135 | DEBUG | [] +2025-01-25 18:16:09.135 | DEBUG | [] +2025-01-25 18:16:10.135 | DEBUG | [] +2025-01-25 18:16:10.135 | DEBUG | [] +2025-01-25 18:16:11.134 | DEBUG | [] +2025-01-25 18:16:11.134 | DEBUG | [] +2025-01-25 18:16:12.135 | DEBUG | [] +2025-01-25 18:16:12.135 | DEBUG | [] +2025-01-25 18:16:13.134 | DEBUG | [] +2025-01-25 18:16:13.134 | DEBUG | [] +2025-01-25 18:16:14.134 | DEBUG | [] +2025-01-25 18:16:14.134 | DEBUG | [] +2025-01-25 18:16:15.134 | DEBUG | [] +2025-01-25 18:16:15.134 | DEBUG | [] +2025-01-25 18:16:16.134 | DEBUG | [] +2025-01-25 18:16:16.134 | DEBUG | [] +2025-01-25 18:16:17.139 | DEBUG | [] +2025-01-25 18:16:17.139 | DEBUG | [] +2025-01-25 18:16:18.139 | DEBUG | [] +2025-01-25 18:16:18.139 | DEBUG | [] +2025-01-25 18:16:19.136 | DEBUG | [] +2025-01-25 18:16:19.136 | DEBUG | [] +2025-01-25 18:16:20.133 | DEBUG | [] +2025-01-25 18:16:20.133 | DEBUG | [] +2025-01-25 18:16:21.141 | DEBUG | [] +2025-01-25 18:16:21.141 | DEBUG | [] +2025-01-25 18:16:22.141 | DEBUG | [] +2025-01-25 18:16:22.141 | DEBUG | [] +2025-01-25 18:16:23.138 | INFO | 按时间调起任务:调度队列_1 +2025-01-25 18:16:23.138 | INFO | 按时间调起任务:调度队列_1 +2025-01-25 18:16:23.140 | INFO | 任务开始:调度队列_1 +2025-01-25 18:16:23.140 | INFO | 任务开始:调度队列_1 +2025-01-25 18:16:23.166 | DEBUG | ['调度队列_1'] +2025-01-25 18:16:23.166 | DEBUG | ['调度队列_1'] +2025-01-25 18:16:23.167 | INFO | 任务开始:脚本_2 +2025-01-25 18:16:23.167 | INFO | 任务开始:脚本_2 +2025-01-25 18:16:24.137 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:16:24.137 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:16:25.134 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:16:25.134 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:16:26.213 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:16:26.213 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:16:26.243 | INFO | 中止任务:调度队列_1 +2025-01-25 18:16:26.243 | INFO | 中止任务:调度队列_1 +2025-01-25 18:16:26.279 | INFO | 申请中止本次任务 +2025-01-25 18:16:26.279 | INFO | 申请中止本次任务 +2025-01-25 18:16:30.407 | INFO | 任务完成:脚本_2 +2025-01-25 18:16:30.407 | INFO | 任务完成:脚本_2 +2025-01-25 18:16:30.410 | DEBUG | ['调度队列_1'] +2025-01-25 18:16:30.410 | DEBUG | ['调度队列_1'] +2025-01-25 18:16:30.414 | INFO | 任务结束:调度队列_1 +2025-01-25 18:16:30.414 | INFO | 任务结束:调度队列_1 +2025-01-25 18:16:31.137 | DEBUG | [] +2025-01-25 18:16:31.137 | DEBUG | [] +2025-01-25 18:16:32.137 | DEBUG | [] +2025-01-25 18:16:32.137 | DEBUG | [] +2025-01-25 18:16:33.139 | DEBUG | [] +2025-01-25 18:16:33.139 | DEBUG | [] +2025-01-25 18:16:34.137 | DEBUG | [] +2025-01-25 18:16:34.137 | DEBUG | [] +2025-01-25 18:16:35.137 | DEBUG | [] +2025-01-25 18:16:35.137 | DEBUG | [] +2025-01-25 18:16:36.137 | DEBUG | [] +2025-01-25 18:16:36.137 | DEBUG | [] +2025-01-25 18:16:37.138 | DEBUG | [] +2025-01-25 18:16:37.138 | DEBUG | [] +2025-01-25 18:16:38.137 | DEBUG | [] +2025-01-25 18:16:38.137 | DEBUG | [] +2025-01-25 18:26:09.413 | INFO | 日志记录器初始化完成 +2025-01-25 18:26:09.413 | INFO | 配置类初始化完成 +2025-01-25 18:26:09.413 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:26:09.835 | INFO | 日志记录器初始化完成 +2025-01-25 18:26:09.835 | INFO | 配置类初始化完成 +2025-01-25 18:26:09.836 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:26:09.835 | INFO | 日志记录器初始化完成 +2025-01-25 18:26:09.835 | INFO | 配置类初始化完成 +2025-01-25 18:26:09.836 | INFO | 程序配置管理模块初始化完成 +2025-01-25 18:26:11.400 | DEBUG | [] +2025-01-25 18:26:11.400 | DEBUG | [] +2025-01-25 18:26:12.398 | DEBUG | [] +2025-01-25 18:26:12.398 | DEBUG | [] +2025-01-25 18:26:13.802 | DEBUG | [] +2025-01-25 18:26:13.802 | DEBUG | [] +2025-01-25 18:26:14.399 | DEBUG | [] +2025-01-25 18:26:14.399 | DEBUG | [] +2025-01-25 18:26:15.403 | DEBUG | [] +2025-01-25 18:26:15.403 | DEBUG | [] +2025-01-25 18:26:16.404 | DEBUG | [] +2025-01-25 18:26:16.404 | DEBUG | [] +2025-01-25 18:26:17.405 | DEBUG | [] +2025-01-25 18:26:17.405 | DEBUG | [] +2025-01-25 18:26:18.405 | DEBUG | [] +2025-01-25 18:26:18.405 | DEBUG | [] +2025-01-25 18:26:19.405 | INFO | 按时间调起任务:调度队列_1 +2025-01-25 18:26:19.405 | INFO | 按时间调起任务:调度队列_1 +2025-01-25 18:26:19.406 | INFO | 任务开始:调度队列_1 +2025-01-25 18:26:19.406 | INFO | 任务开始:调度队列_1 +2025-01-25 18:26:19.425 | DEBUG | ['调度队列_1'] +2025-01-25 18:26:19.425 | DEBUG | ['调度队列_1'] +2025-01-25 18:26:19.426 | INFO | 任务开始:脚本_2 +2025-01-25 18:26:19.426 | INFO | 任务开始:脚本_2 +2025-01-25 18:26:20.414 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:26:20.414 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:26:21.405 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:26:21.405 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:26:22.468 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:26:22.468 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 18:26:22.478 | INFO | 中止任务:调度队列_1 +2025-01-25 18:26:22.478 | INFO | 中止任务:调度队列_1 +2025-01-25 18:26:22.518 | INFO | 申请中止本次任务 +2025-01-25 18:26:22.518 | INFO | 申请中止本次任务 +2025-01-25 18:26:26.024 | INFO | 任务完成:脚本_2 +2025-01-25 18:26:26.024 | INFO | 任务完成:脚本_2 +2025-01-25 18:26:26.027 | DEBUG | ['调度队列_1'] +2025-01-25 18:26:26.027 | DEBUG | ['调度队列_1'] +2025-01-25 18:26:26.031 | INFO | 任务结束:调度队列_1 +2025-01-25 18:26:26.031 | INFO | 任务结束:调度队列_1 +2025-01-25 18:26:26.446 | DEBUG | [] +2025-01-25 18:26:26.446 | DEBUG | [] +2025-01-25 18:26:27.404 | DEBUG | [] +2025-01-25 18:26:27.404 | DEBUG | [] +2025-01-25 18:26:28.404 | DEBUG | [] +2025-01-25 18:26:28.404 | DEBUG | [] +2025-01-25 18:26:29.402 | DEBUG | [] +2025-01-25 18:26:29.402 | DEBUG | [] +2025-01-25 18:26:30.400 | DEBUG | [] +2025-01-25 18:26:30.400 | DEBUG | [] +2025-01-25 18:26:31.403 | DEBUG | [] +2025-01-25 18:26:31.403 | DEBUG | [] +2025-01-25 18:26:32.405 | DEBUG | [] +2025-01-25 18:26:32.405 | DEBUG | [] +2025-01-25 18:26:33.403 | DEBUG | [] +2025-01-25 18:26:33.403 | DEBUG | [] +2025-01-25 18:26:34.403 | DEBUG | [] +2025-01-25 18:26:34.403 | DEBUG | [] +2025-01-25 18:33:13.458 | INFO | 日志记录器初始化完成 +2025-01-25 18:33:13.459 | INFO | 配置类初始化完成 +2025-01-25 18:33:13.459 | INFO | 程序配置管理模块初始化完成 +2025-01-25 19:54:36.822 | INFO | 日志记录器初始化完成 +2025-01-25 19:54:36.822 | INFO | 配置类初始化完成 +2025-01-25 19:54:36.822 | INFO | 程序配置管理模块初始化完成 +2025-01-25 19:56:27.107 | INFO | 日志记录器初始化完成 +2025-01-25 19:56:27.107 | INFO | 配置类初始化完成 +2025-01-25 19:56:27.107 | INFO | 程序配置管理模块初始化完成 +2025-01-25 19:56:50.749 | INFO | 日志记录器初始化完成 +2025-01-25 19:56:50.749 | INFO | 配置类初始化完成 +2025-01-25 19:56:50.749 | INFO | 程序配置管理模块初始化完成 +2025-01-25 19:58:05.103 | INFO | 日志记录器初始化完成 +2025-01-25 19:58:05.103 | INFO | 配置类初始化完成 +2025-01-25 19:58:05.104 | INFO | 程序配置管理模块初始化完成 +2025-01-25 19:59:44.416 | INFO | 日志记录器初始化完成 +2025-01-25 19:59:44.417 | INFO | 配置类初始化完成 +2025-01-25 19:59:44.417 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:00:18.237 | INFO | 日志记录器初始化完成 +2025-01-25 20:00:18.237 | INFO | 配置类初始化完成 +2025-01-25 20:00:18.237 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:01:05.945 | INFO | 日志记录器初始化完成 +2025-01-25 20:01:05.945 | INFO | 配置类初始化完成 +2025-01-25 20:01:05.945 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:01:38.131 | INFO | 日志记录器初始化完成 +2025-01-25 20:01:38.131 | INFO | 配置类初始化完成 +2025-01-25 20:01:38.131 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:02:37.816 | INFO | 日志记录器初始化完成 +2025-01-25 20:02:37.816 | INFO | 配置类初始化完成 +2025-01-25 20:02:37.816 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:29:29.801 | INFO | 日志记录器初始化完成 +2025-01-25 20:29:29.801 | INFO | 配置类初始化完成 +2025-01-25 20:29:29.801 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:29:52.719 | INFO | 日志记录器初始化完成 +2025-01-25 20:29:52.719 | INFO | 配置类初始化完成 +2025-01-25 20:29:52.720 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:30:13.394 | INFO | 日志记录器初始化完成 +2025-01-25 20:30:13.394 | INFO | 配置类初始化完成 +2025-01-25 20:30:13.395 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:30:31.331 | INFO | 日志记录器初始化完成 +2025-01-25 20:30:31.331 | INFO | 配置类初始化完成 +2025-01-25 20:30:31.332 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:30:58.949 | INFO | 日志记录器初始化完成 +2025-01-25 20:30:58.950 | INFO | 配置类初始化完成 +2025-01-25 20:30:58.950 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:31:19.002 | INFO | 日志记录器初始化完成 +2025-01-25 20:31:19.002 | INFO | 配置类初始化完成 +2025-01-25 20:31:19.002 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:31:35.661 | INFO | 日志记录器初始化完成 +2025-01-25 20:31:35.661 | INFO | 配置类初始化完成 +2025-01-25 20:31:35.662 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:31:37.764 | DEBUG | [] +2025-01-25 20:31:38.743 | DEBUG | [] +2025-01-25 20:31:39.742 | DEBUG | [] +2025-01-25 20:31:40.749 | DEBUG | [] +2025-01-25 20:31:41.748 | DEBUG | [] +2025-01-25 20:31:42.746 | DEBUG | [] +2025-01-25 20:31:43.822 | DEBUG | [] +2025-01-25 20:31:44.748 | DEBUG | [] +2025-01-25 20:31:45.747 | DEBUG | [] +2025-01-25 20:31:46.743 | DEBUG | [] +2025-01-25 20:31:47.747 | DEBUG | [] +2025-01-25 20:31:48.748 | DEBUG | [] +2025-01-25 20:31:49.748 | DEBUG | [] +2025-01-25 20:31:50.747 | DEBUG | [] +2025-01-25 20:31:51.747 | INFO | 按时间调起任务:调度队列_1 +2025-01-25 20:31:51.747 | INFO | 任务开始:调度队列_1 +2025-01-25 20:31:51.753 | DEBUG | ['调度队列_1'] +2025-01-25 20:31:52.743 | DEBUG | ['调度队列_1'] +2025-01-25 20:31:53.747 | DEBUG | ['调度队列_1'] +2025-01-25 20:31:54.747 | DEBUG | ['调度队列_1'] +2025-01-25 20:32:23.144 | INFO | 日志记录器初始化完成 +2025-01-25 20:32:23.146 | INFO | 配置类初始化完成 +2025-01-25 20:32:23.146 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:32:25.221 | DEBUG | [] +2025-01-25 20:32:25.232 | DEBUG | [] +2025-01-25 20:32:26.228 | DEBUG | [] +2025-01-25 20:32:27.609 | DEBUG | [] +2025-01-25 20:32:28.226 | DEBUG | [] +2025-01-25 20:32:29.233 | DEBUG | [] +2025-01-25 20:32:30.228 | INFO | 按时间调起任务:调度队列_1 +2025-01-25 20:32:30.229 | INFO | 任务开始:调度队列_1 +2025-01-25 20:32:30.251 | DEBUG | ['调度队列_1'] +2025-01-25 20:32:30.252 | INFO | 任务开始:脚本_2 +2025-01-25 20:32:39.557 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:32:40.232 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:32:41.232 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:32:42.236 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:32:43.231 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:32:44.230 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:26.084 | INFO | 日志记录器初始化完成 +2025-01-25 20:33:26.084 | INFO | 配置类初始化完成 +2025-01-25 20:33:26.085 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:33:28.172 | DEBUG | [] +2025-01-25 20:33:29.165 | DEBUG | [] +2025-01-25 20:33:30.167 | DEBUG | [] +2025-01-25 20:33:31.166 | DEBUG | [] +2025-01-25 20:33:32.170 | DEBUG | [] +2025-01-25 20:33:33.170 | DEBUG | [] +2025-01-25 20:33:34.170 | INFO | 按时间调起任务:调度队列_1 +2025-01-25 20:33:34.170 | INFO | 任务开始:调度队列_1 +2025-01-25 20:33:34.192 | DEBUG | ['调度队列_1'] +2025-01-25 20:33:34.194 | INFO | 任务开始:脚本_2 +2025-01-25 20:33:35.171 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:36.166 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:37.230 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:38.168 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:39.172 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:40.216 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:41.171 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:42.169 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:43.169 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-25 20:33:43.184 | INFO | 中止任务:调度队列_1 +2025-01-25 20:33:43.187 | INFO | 申请中止本次任务 +2025-01-25 20:33:46.901 | INFO | 任务完成:脚本_2 +2025-01-25 20:33:46.903 | DEBUG | ['调度队列_1'] +2025-01-25 20:33:46.906 | INFO | 任务结束:调度队列_1 +2025-01-25 20:33:47.170 | DEBUG | [] +2025-01-25 20:33:48.169 | DEBUG | [] +2025-01-25 20:33:49.169 | DEBUG | [] +2025-01-25 20:33:50.170 | DEBUG | [] +2025-01-25 20:33:51.169 | DEBUG | [] +2025-01-25 20:33:52.167 | DEBUG | [] +2025-01-25 20:33:53.446 | DEBUG | [] +2025-01-25 20:33:54.167 | DEBUG | [] +2025-01-25 20:33:55.168 | DEBUG | [] +2025-01-25 20:33:56.168 | DEBUG | [] +2025-01-25 20:33:57.167 | DEBUG | [] +2025-01-25 20:41:49.496 | INFO | 日志记录器初始化完成 +2025-01-25 20:41:49.496 | INFO | 配置类初始化完成 +2025-01-25 20:41:49.497 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:41:51.450 | DEBUG | [] +2025-01-25 20:41:51.575 | DEBUG | [] +2025-01-25 20:41:52.574 | DEBUG | [] +2025-01-25 20:41:53.575 | DEBUG | [] +2025-01-25 20:41:54.574 | DEBUG | [] +2025-01-25 20:41:55.575 | DEBUG | [] +2025-01-25 20:41:56.574 | DEBUG | [] +2025-01-25 20:41:57.574 | DEBUG | [] +2025-01-25 20:41:58.575 | DEBUG | [] +2025-01-25 20:41:59.574 | DEBUG | [] +2025-01-25 20:42:00.574 | DEBUG | [] +2025-01-25 20:42:01.573 | DEBUG | [] +2025-01-25 20:42:02.573 | DEBUG | [] +2025-01-25 20:42:03.573 | DEBUG | [] +2025-01-25 20:42:04.573 | DEBUG | [] +2025-01-25 20:42:05.574 | DEBUG | [] +2025-01-25 20:42:06.574 | DEBUG | [] +2025-01-25 20:42:07.574 | DEBUG | [] +2025-01-25 20:42:08.573 | DEBUG | [] +2025-01-25 20:42:09.572 | DEBUG | [] +2025-01-25 20:42:10.573 | DEBUG | [] +2025-01-25 20:42:11.573 | DEBUG | [] +2025-01-25 20:42:12.571 | DEBUG | [] +2025-01-25 20:42:13.572 | DEBUG | [] +2025-01-25 20:42:14.573 | DEBUG | [] +2025-01-25 20:42:15.572 | DEBUG | [] +2025-01-25 20:42:16.572 | DEBUG | [] +2025-01-25 20:42:17.574 | DEBUG | [] +2025-01-25 20:42:18.575 | DEBUG | [] +2025-01-25 20:42:19.573 | DEBUG | [] +2025-01-25 20:42:20.580 | DEBUG | [] +2025-01-25 20:42:21.579 | DEBUG | [] +2025-01-25 20:42:22.577 | DEBUG | [] +2025-01-25 20:42:23.576 | DEBUG | [] +2025-01-25 20:42:24.576 | DEBUG | [] +2025-01-25 20:42:25.577 | DEBUG | [] +2025-01-25 20:42:26.574 | DEBUG | [] +2025-01-25 20:42:27.571 | DEBUG | [] +2025-01-25 20:42:28.577 | DEBUG | [] +2025-01-25 20:42:29.576 | DEBUG | [] +2025-01-25 20:42:30.572 | DEBUG | [] +2025-01-25 20:42:31.572 | DEBUG | [] +2025-01-25 20:42:32.572 | DEBUG | [] +2025-01-25 20:42:33.572 | DEBUG | [] +2025-01-25 20:42:34.572 | DEBUG | [] +2025-01-25 20:42:35.577 | DEBUG | [] +2025-01-25 20:42:36.574 | DEBUG | [] +2025-01-25 20:42:37.575 | DEBUG | [] +2025-01-25 20:42:38.578 | DEBUG | [] +2025-01-25 20:42:39.574 | DEBUG | [] +2025-01-25 20:42:40.577 | DEBUG | [] +2025-01-25 20:42:41.574 | DEBUG | [] +2025-01-25 20:42:42.574 | DEBUG | [] +2025-01-25 20:42:43.577 | DEBUG | [] +2025-01-25 20:42:44.572 | DEBUG | [] +2025-01-25 20:42:45.576 | DEBUG | [] +2025-01-25 20:42:46.574 | DEBUG | [] +2025-01-25 20:42:47.573 | DEBUG | [] +2025-01-25 20:42:48.575 | DEBUG | [] +2025-01-25 20:42:49.574 | DEBUG | [] +2025-01-25 20:42:50.575 | DEBUG | [] +2025-01-25 20:42:51.574 | DEBUG | [] +2025-01-25 20:42:52.574 | DEBUG | [] +2025-01-25 20:42:53.573 | DEBUG | [] +2025-01-25 20:42:54.573 | DEBUG | [] +2025-01-25 20:42:55.582 | DEBUG | [] +2025-01-25 20:42:56.573 | DEBUG | [] +2025-01-25 20:42:57.580 | DEBUG | [] +2025-01-25 20:42:58.572 | DEBUG | [] +2025-01-25 20:42:59.573 | DEBUG | [] +2025-01-25 20:43:00.575 | DEBUG | [] +2025-01-25 20:43:01.571 | DEBUG | [] +2025-01-25 20:43:02.574 | DEBUG | [] +2025-01-25 20:43:03.578 | DEBUG | [] +2025-01-25 20:43:04.573 | DEBUG | [] +2025-01-25 20:43:05.574 | DEBUG | [] +2025-01-25 20:43:06.577 | DEBUG | [] +2025-01-25 20:43:07.577 | DEBUG | [] +2025-01-25 20:43:08.572 | DEBUG | [] +2025-01-25 20:43:09.573 | DEBUG | [] +2025-01-25 20:43:10.578 | DEBUG | [] +2025-01-25 20:43:11.578 | DEBUG | [] +2025-01-25 20:43:12.579 | DEBUG | [] +2025-01-25 20:43:13.577 | DEBUG | [] +2025-01-25 20:43:14.576 | DEBUG | [] +2025-01-25 20:43:15.577 | DEBUG | [] +2025-01-25 20:43:16.575 | DEBUG | [] +2025-01-25 20:43:17.577 | DEBUG | [] +2025-01-25 20:43:18.576 | DEBUG | [] +2025-01-25 20:43:19.577 | DEBUG | [] +2025-01-25 20:43:20.577 | DEBUG | [] +2025-01-25 20:43:21.574 | DEBUG | [] +2025-01-25 20:43:22.575 | DEBUG | [] +2025-01-25 20:43:23.575 | DEBUG | [] +2025-01-25 20:43:24.575 | DEBUG | [] +2025-01-25 20:43:25.576 | DEBUG | [] +2025-01-25 20:43:26.574 | DEBUG | [] +2025-01-25 20:43:27.576 | DEBUG | [] +2025-01-25 20:43:28.575 | DEBUG | [] +2025-01-25 20:43:29.574 | DEBUG | [] +2025-01-25 20:43:30.575 | DEBUG | [] +2025-01-25 20:43:31.574 | DEBUG | [] +2025-01-25 20:43:32.572 | DEBUG | [] +2025-01-25 20:43:33.573 | DEBUG | [] +2025-01-25 20:43:34.573 | DEBUG | [] +2025-01-25 20:43:35.572 | DEBUG | [] +2025-01-25 20:43:36.572 | DEBUG | [] +2025-01-25 20:43:37.573 | DEBUG | [] +2025-01-25 20:43:38.573 | DEBUG | [] +2025-01-25 20:43:39.574 | DEBUG | [] +2025-01-25 20:43:40.573 | DEBUG | [] +2025-01-25 20:43:41.572 | DEBUG | [] +2025-01-25 20:43:42.573 | DEBUG | [] +2025-01-25 20:43:43.572 | DEBUG | [] +2025-01-25 20:43:44.575 | DEBUG | [] +2025-01-25 20:43:45.573 | DEBUG | [] +2025-01-25 20:43:46.572 | DEBUG | [] +2025-01-25 20:43:47.571 | DEBUG | [] +2025-01-25 20:43:48.571 | DEBUG | [] +2025-01-25 20:43:49.572 | DEBUG | [] +2025-01-25 20:43:50.578 | DEBUG | [] +2025-01-25 20:43:51.577 | DEBUG | [] +2025-01-25 20:43:52.575 | DEBUG | [] +2025-01-25 20:43:53.573 | DEBUG | [] +2025-01-25 20:43:54.575 | DEBUG | [] +2025-01-25 20:43:55.574 | DEBUG | [] +2025-01-25 20:43:56.573 | DEBUG | [] +2025-01-25 20:43:57.576 | DEBUG | [] +2025-01-25 20:43:58.577 | DEBUG | [] +2025-01-25 20:43:59.576 | DEBUG | [] +2025-01-25 20:44:00.576 | DEBUG | [] +2025-01-25 20:44:01.574 | DEBUG | [] +2025-01-25 20:44:02.575 | DEBUG | [] +2025-01-25 20:44:03.571 | DEBUG | [] +2025-01-25 20:44:04.577 | DEBUG | [] +2025-01-25 20:44:05.576 | DEBUG | [] +2025-01-25 20:44:06.577 | DEBUG | [] +2025-01-25 20:44:07.576 | DEBUG | [] +2025-01-25 20:44:08.576 | DEBUG | [] +2025-01-25 20:44:09.575 | DEBUG | [] +2025-01-25 20:44:10.575 | DEBUG | [] +2025-01-25 20:44:11.575 | DEBUG | [] +2025-01-25 20:44:12.575 | DEBUG | [] +2025-01-25 20:44:13.574 | DEBUG | [] +2025-01-25 20:44:14.575 | DEBUG | [] +2025-01-25 20:44:15.573 | DEBUG | [] +2025-01-25 20:44:16.574 | DEBUG | [] +2025-01-25 20:44:17.574 | DEBUG | [] +2025-01-25 20:44:18.575 | DEBUG | [] +2025-01-25 20:44:19.573 | DEBUG | [] +2025-01-25 20:44:20.574 | DEBUG | [] +2025-01-25 20:44:21.574 | DEBUG | [] +2025-01-25 20:44:22.576 | DEBUG | [] +2025-01-25 20:44:23.572 | DEBUG | [] +2025-01-25 20:44:24.573 | DEBUG | [] +2025-01-25 20:44:25.573 | DEBUG | [] +2025-01-25 20:44:26.573 | DEBUG | [] +2025-01-25 20:44:27.573 | DEBUG | [] +2025-01-25 20:44:28.575 | DEBUG | [] +2025-01-25 20:44:29.573 | DEBUG | [] +2025-01-25 20:44:30.572 | DEBUG | [] +2025-01-25 20:44:31.577 | DEBUG | [] +2025-01-25 20:44:32.577 | DEBUG | [] +2025-01-25 20:44:33.572 | DEBUG | [] +2025-01-25 20:44:34.579 | DEBUG | [] +2025-01-25 20:44:35.571 | DEBUG | [] +2025-01-25 20:44:36.572 | DEBUG | [] +2025-01-25 20:44:37.572 | DEBUG | [] +2025-01-25 20:44:38.571 | DEBUG | [] +2025-01-25 20:44:39.579 | DEBUG | [] +2025-01-25 20:44:40.578 | DEBUG | [] +2025-01-25 20:44:41.579 | DEBUG | [] +2025-01-25 20:44:42.575 | DEBUG | [] +2025-01-25 20:44:43.576 | DEBUG | [] +2025-01-25 20:44:44.575 | DEBUG | [] +2025-01-25 20:44:45.573 | DEBUG | [] +2025-01-25 20:44:46.578 | DEBUG | [] +2025-01-25 20:44:47.577 | DEBUG | [] +2025-01-25 20:44:48.577 | DEBUG | [] +2025-01-25 20:44:49.576 | DEBUG | [] +2025-01-25 20:44:50.576 | DEBUG | [] +2025-01-25 20:44:51.575 | DEBUG | [] +2025-01-25 20:44:52.576 | DEBUG | [] +2025-01-25 20:44:53.572 | DEBUG | [] +2025-01-25 20:44:54.575 | DEBUG | [] +2025-01-25 20:44:55.574 | DEBUG | [] +2025-01-25 20:44:56.576 | DEBUG | [] +2025-01-25 20:44:57.574 | DEBUG | [] +2025-01-25 20:44:58.574 | DEBUG | [] +2025-01-25 20:44:59.574 | DEBUG | [] +2025-01-25 20:45:00.574 | DEBUG | [] +2025-01-25 20:45:01.573 | DEBUG | [] +2025-01-25 20:45:02.575 | DEBUG | [] +2025-01-25 20:45:03.572 | DEBUG | [] +2025-01-25 20:45:04.574 | DEBUG | [] +2025-01-25 20:45:05.574 | DEBUG | [] +2025-01-25 20:45:06.572 | DEBUG | [] +2025-01-25 20:45:07.574 | DEBUG | [] +2025-01-25 20:45:08.573 | DEBUG | [] +2025-01-25 20:45:09.573 | DEBUG | [] +2025-01-25 20:45:10.573 | DEBUG | [] +2025-01-25 20:45:11.573 | DEBUG | [] +2025-01-25 20:45:12.573 | DEBUG | [] +2025-01-25 20:45:13.571 | DEBUG | [] +2025-01-25 20:45:14.578 | DEBUG | [] +2025-01-25 20:45:15.572 | DEBUG | [] +2025-01-25 20:45:16.571 | DEBUG | [] +2025-01-25 20:45:17.579 | DEBUG | [] +2025-01-25 20:45:18.577 | DEBUG | [] +2025-01-25 20:45:19.577 | DEBUG | [] +2025-01-25 20:45:20.571 | DEBUG | [] +2025-01-25 20:45:21.572 | DEBUG | [] +2025-01-25 20:45:22.577 | DEBUG | [] +2025-01-25 20:45:23.573 | DEBUG | [] +2025-01-25 20:45:24.578 | DEBUG | [] +2025-01-25 20:45:25.576 | DEBUG | [] +2025-01-25 20:45:26.576 | DEBUG | [] +2025-01-25 20:45:27.577 | DEBUG | [] +2025-01-25 20:45:28.576 | DEBUG | [] +2025-01-25 20:45:29.574 | DEBUG | [] +2025-01-25 20:45:30.575 | DEBUG | [] +2025-01-25 20:45:31.577 | DEBUG | [] +2025-01-25 20:45:32.577 | DEBUG | [] +2025-01-25 20:45:33.576 | DEBUG | [] +2025-01-25 20:45:34.574 | DEBUG | [] +2025-01-25 20:45:35.573 | DEBUG | [] +2025-01-25 20:45:36.574 | DEBUG | [] +2025-01-25 20:45:37.576 | DEBUG | [] +2025-01-25 20:45:38.574 | DEBUG | [] +2025-01-25 20:45:39.575 | DEBUG | [] +2025-01-25 20:45:40.576 | DEBUG | [] +2025-01-25 20:45:41.574 | DEBUG | [] +2025-01-25 20:45:42.574 | DEBUG | [] +2025-01-25 20:45:43.574 | DEBUG | [] +2025-01-25 20:45:44.574 | DEBUG | [] +2025-01-25 20:45:45.574 | DEBUG | [] +2025-01-25 20:45:46.574 | DEBUG | [] +2025-01-25 20:45:47.575 | DEBUG | [] +2025-01-25 20:45:48.575 | DEBUG | [] +2025-01-25 20:45:49.575 | DEBUG | [] +2025-01-25 20:45:50.575 | DEBUG | [] +2025-01-25 20:45:51.573 | DEBUG | [] +2025-01-25 20:45:52.573 | DEBUG | [] +2025-01-25 20:45:53.574 | DEBUG | [] +2025-01-25 20:45:54.575 | DEBUG | [] +2025-01-25 20:45:55.573 | DEBUG | [] +2025-01-25 20:45:56.573 | DEBUG | [] +2025-01-25 20:45:57.573 | DEBUG | [] +2025-01-25 20:45:58.573 | DEBUG | [] +2025-01-25 20:45:59.579 | DEBUG | [] +2025-01-25 20:46:00.573 | DEBUG | [] +2025-01-25 20:46:01.571 | DEBUG | [] +2025-01-25 20:46:02.572 | DEBUG | [] +2025-01-25 20:46:03.572 | DEBUG | [] +2025-01-25 20:46:04.573 | DEBUG | [] +2025-01-25 20:46:05.572 | DEBUG | [] +2025-01-25 20:46:06.572 | DEBUG | [] +2025-01-25 20:46:07.578 | DEBUG | [] +2025-01-25 20:46:08.578 | DEBUG | [] +2025-01-25 20:46:09.574 | DEBUG | [] +2025-01-25 20:46:10.575 | DEBUG | [] +2025-01-25 20:46:11.576 | DEBUG | [] +2025-01-25 20:46:12.576 | DEBUG | [] +2025-01-25 20:46:13.574 | DEBUG | [] +2025-01-25 20:46:14.575 | DEBUG | [] +2025-01-25 20:46:15.572 | DEBUG | [] +2025-01-25 20:46:16.577 | DEBUG | [] +2025-01-25 20:46:17.577 | DEBUG | [] +2025-01-25 20:46:18.578 | DEBUG | [] +2025-01-25 20:46:19.575 | DEBUG | [] +2025-01-25 20:46:20.574 | DEBUG | [] +2025-01-25 20:46:21.572 | DEBUG | [] +2025-01-25 20:46:22.577 | DEBUG | [] +2025-01-25 20:46:23.574 | DEBUG | [] +2025-01-25 20:46:24.575 | DEBUG | [] +2025-01-25 20:46:25.574 | DEBUG | [] +2025-01-25 20:46:26.573 | DEBUG | [] +2025-01-25 20:46:27.576 | DEBUG | [] +2025-01-25 20:46:28.575 | DEBUG | [] +2025-01-25 20:46:29.576 | DEBUG | [] +2025-01-25 20:46:30.574 | DEBUG | [] +2025-01-25 20:46:31.575 | DEBUG | [] +2025-01-25 20:46:32.575 | DEBUG | [] +2025-01-25 20:46:33.573 | DEBUG | [] +2025-01-25 20:46:34.576 | DEBUG | [] +2025-01-25 20:46:35.573 | DEBUG | [] +2025-01-25 20:46:36.574 | DEBUG | [] +2025-01-25 20:46:37.574 | DEBUG | [] +2025-01-25 20:46:38.572 | DEBUG | [] +2025-01-25 20:46:39.573 | DEBUG | [] +2025-01-25 20:46:40.574 | DEBUG | [] +2025-01-25 20:46:41.573 | DEBUG | [] +2025-01-25 20:46:42.579 | DEBUG | [] +2025-01-25 20:46:43.572 | DEBUG | [] +2025-01-25 20:46:44.573 | DEBUG | [] +2025-01-25 20:46:45.572 | DEBUG | [] +2025-01-25 20:46:46.573 | DEBUG | [] +2025-01-25 20:46:47.574 | DEBUG | [] +2025-01-25 20:46:48.573 | DEBUG | [] +2025-01-25 20:46:49.572 | DEBUG | [] +2025-01-25 20:46:50.573 | DEBUG | [] +2025-01-25 20:46:51.574 | DEBUG | [] +2025-01-25 20:46:52.571 | DEBUG | [] +2025-01-25 20:46:53.580 | DEBUG | [] +2025-01-25 20:46:54.580 | DEBUG | [] +2025-01-25 20:46:55.579 | DEBUG | [] +2025-01-25 20:46:56.572 | DEBUG | [] +2025-01-25 20:46:57.576 | DEBUG | [] +2025-01-25 20:46:58.577 | DEBUG | [] +2025-01-25 20:46:59.577 | DEBUG | [] +2025-01-25 20:47:00.576 | DEBUG | [] +2025-01-25 20:47:01.576 | DEBUG | [] +2025-01-25 20:47:02.574 | DEBUG | [] +2025-01-25 20:47:03.577 | DEBUG | [] +2025-01-25 20:47:04.577 | DEBUG | [] +2025-01-25 20:47:05.577 | DEBUG | [] +2025-01-25 20:47:06.575 | DEBUG | [] +2025-01-25 20:47:07.574 | DEBUG | [] +2025-01-25 20:47:08.573 | DEBUG | [] +2025-01-25 20:47:09.575 | DEBUG | [] +2025-01-25 20:47:10.576 | DEBUG | [] +2025-01-25 20:47:11.574 | DEBUG | [] +2025-01-25 20:47:12.574 | DEBUG | [] +2025-01-25 20:47:13.574 | DEBUG | [] +2025-01-25 20:47:14.576 | DEBUG | [] +2025-01-25 20:47:15.574 | DEBUG | [] +2025-01-25 20:47:16.573 | DEBUG | [] +2025-01-25 20:51:50.441 | INFO | 日志记录器初始化完成 +2025-01-25 20:51:50.441 | INFO | 配置类初始化完成 +2025-01-25 20:51:50.443 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:52:39.704 | INFO | 日志记录器初始化完成 +2025-01-25 20:52:39.705 | INFO | 配置类初始化完成 +2025-01-25 20:52:39.705 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:52:41.637 | DEBUG | D:\程序开发\AUTO_MAA, D:\程序开发\AUTO_MAA\main.py +2025-01-25 20:52:41.667 | DEBUG | [] +2025-01-25 20:52:41.779 | DEBUG | [] +2025-01-25 20:52:42.777 | DEBUG | [] +2025-01-25 20:52:43.777 | DEBUG | [] +2025-01-25 20:52:44.779 | DEBUG | [] +2025-01-25 20:59:03.259 | INFO | 日志记录器初始化完成 +2025-01-25 20:59:03.259 | INFO | 配置类初始化完成 +2025-01-25 20:59:03.260 | INFO | 程序配置管理模块初始化完成 +2025-01-25 20:59:05.168 | DEBUG | D:\程序开发\AUTO_MAA, D:\程序开发\AUTO_MAA\main.py +2025-01-25 20:59:05.194 | DEBUG | [] +2025-01-25 20:59:05.337 | DEBUG | [] +2025-01-25 20:59:06.342 | DEBUG | [] +2025-01-25 20:59:07.342 | DEBUG | [] +2025-01-25 20:59:08.338 | DEBUG | [] +2025-01-26 07:39:34.101 | INFO | 日志记录器初始化完成 +2025-01-26 07:39:34.102 | INFO | 配置类初始化完成 +2025-01-26 07:39:34.102 | INFO | 程序配置管理模块初始化完成 +2025-01-26 07:39:36.413 | DEBUG | D:\程序开发\AUTO_MAA, D:\程序开发\AUTO_MAA\main.py +2025-01-26 07:39:36.440 | DEBUG | [] +2025-01-26 07:39:37.196 | DEBUG | [] +2025-01-26 07:39:38.201 | DEBUG | [] +2025-01-26 07:39:39.196 | DEBUG | [] +2025-01-26 07:39:40.195 | DEBUG | [] +2025-01-26 07:39:41.197 | DEBUG | [] +2025-01-26 07:39:42.195 | DEBUG | [] +2025-01-26 07:39:43.074 | WARNING | 未选择调度模式 +2025-01-26 07:39:43.196 | DEBUG | [] +2025-01-26 07:39:44.196 | DEBUG | [] +2025-01-26 07:39:45.197 | DEBUG | [] +2025-01-26 07:39:46.198 | DEBUG | [] +2025-01-26 07:39:47.198 | DEBUG | [] +2025-01-26 07:39:48.198 | DEBUG | [] +2025-01-26 07:39:49.420 | DEBUG | [] +2025-01-26 07:39:50.417 | DEBUG | [] +2025-01-26 07:39:51.417 | DEBUG | [] +2025-01-26 07:39:52.417 | DEBUG | [] +2025-01-26 07:39:53.417 | DEBUG | [] +2025-01-26 07:39:54.417 | DEBUG | [] +2025-01-26 07:40:11.603 | INFO | 日志记录器初始化完成 +2025-01-26 07:40:11.603 | INFO | 配置类初始化完成 +2025-01-26 07:40:11.603 | INFO | 程序配置管理模块初始化完成 +2025-01-26 07:40:13.655 | DEBUG | D:\程序开发\AUTO_MAA, D:\程序开发\AUTO_MAA\main.py +2025-01-26 07:40:13.685 | DEBUG | [] +2025-01-26 07:40:14.682 | DEBUG | [] +2025-01-26 07:40:15.682 | DEBUG | [] +2025-01-26 07:40:16.682 | DEBUG | [] +2025-01-26 07:40:17.682 | DEBUG | [] +2025-01-26 07:40:18.681 | DEBUG | [] +2025-01-26 07:40:19.682 | DEBUG | [] +2025-01-26 07:40:20.682 | DEBUG | [] +2025-01-26 07:40:21.682 | DEBUG | [] +2025-01-26 07:40:22.682 | DEBUG | [] +2025-01-26 07:40:23.682 | DEBUG | [] +2025-01-26 07:40:24.681 | DEBUG | [] +2025-01-26 07:40:25.687 | DEBUG | [] +2025-01-26 07:40:26.682 | DEBUG | [] +2025-01-26 07:40:27.686 | DEBUG | [] +2025-01-26 07:40:28.681 | DEBUG | [] +2025-01-26 07:40:29.687 | DEBUG | [] +2025-01-26 07:40:30.686 | DEBUG | [] +2025-01-26 07:40:31.687 | DEBUG | [] +2025-01-26 07:40:32.679 | DEBUG | [] +2025-01-26 07:40:33.685 | DEBUG | [] +2025-01-26 07:40:34.684 | DEBUG | [] +2025-01-26 07:40:35.686 | DEBUG | [] +2025-01-26 07:40:36.686 | DEBUG | [] +2025-01-26 07:40:37.685 | DEBUG | [] +2025-01-26 07:40:38.685 | DEBUG | [] +2025-01-26 07:40:39.685 | DEBUG | [] +2025-01-26 07:40:40.685 | DEBUG | [] +2025-01-26 07:40:41.685 | DEBUG | [] +2025-01-26 07:40:42.685 | DEBUG | [] +2025-01-26 07:40:43.685 | DEBUG | [] +2025-01-26 07:40:44.684 | DEBUG | [] +2025-01-26 07:40:45.684 | DEBUG | [] +2025-01-26 07:40:46.684 | DEBUG | [] +2025-01-26 07:40:47.683 | DEBUG | [] +2025-01-26 07:40:48.682 | DEBUG | [] +2025-01-26 07:40:49.684 | DEBUG | [] +2025-01-26 07:40:50.684 | DEBUG | [] +2025-01-26 07:40:51.683 | DEBUG | [] +2025-01-26 07:40:52.683 | DEBUG | [] +2025-01-26 07:40:53.683 | DEBUG | [] +2025-01-26 07:40:54.684 | DEBUG | [] +2025-01-26 07:40:55.680 | DEBUG | [] +2025-01-26 07:40:56.682 | DEBUG | [] +2025-01-26 07:40:57.683 | DEBUG | [] +2025-01-26 07:40:58.681 | DEBUG | [] +2025-01-26 07:40:59.684 | DEBUG | [] +2025-01-26 07:41:00.679 | DEBUG | [] +2025-01-26 07:41:01.679 | DEBUG | [] +2025-01-26 07:41:02.681 | DEBUG | [] +2025-01-26 07:41:03.683 | DEBUG | [] +2025-01-26 07:41:04.682 | DEBUG | [] +2025-01-26 07:41:05.682 | DEBUG | [] +2025-01-26 07:41:06.680 | DEBUG | [] +2025-01-26 07:41:07.682 | DEBUG | [] +2025-01-26 07:41:08.681 | DEBUG | [] +2025-01-26 07:41:09.682 | DEBUG | [] +2025-01-26 07:41:10.681 | DEBUG | [] +2025-01-26 07:41:11.681 | DEBUG | [] +2025-01-26 07:41:12.687 | DEBUG | [] +2025-01-26 07:41:13.682 | DEBUG | [] +2025-01-26 07:41:14.694 | DEBUG | [] +2025-01-26 07:41:15.680 | DEBUG | [] +2025-01-26 07:41:16.679 | DEBUG | [] +2025-01-26 07:41:17.686 | DEBUG | [] +2025-01-26 07:41:18.682 | DEBUG | [] +2025-01-26 07:41:19.686 | DEBUG | [] +2025-01-26 07:41:20.686 | DEBUG | [] +2025-01-26 07:41:21.685 | DEBUG | [] +2025-01-26 07:41:22.686 | DEBUG | [] +2025-01-26 07:41:23.685 | DEBUG | [] +2025-01-26 07:41:24.686 | DEBUG | [] +2025-01-26 07:41:25.685 | DEBUG | [] +2025-01-26 07:41:26.686 | DEBUG | [] +2025-01-26 07:41:27.684 | DEBUG | [] +2025-01-26 07:41:28.695 | DEBUG | [] +2025-01-26 07:41:29.684 | DEBUG | [] +2025-01-26 07:41:30.684 | DEBUG | [] +2025-01-26 07:41:31.684 | DEBUG | [] +2025-01-26 07:41:32.684 | DEBUG | [] +2025-01-26 07:41:33.684 | DEBUG | [] +2025-01-26 07:41:34.684 | DEBUG | [] +2025-01-26 07:41:35.684 | DEBUG | [] +2025-01-26 07:41:36.683 | DEBUG | [] +2025-01-26 07:41:37.683 | DEBUG | [] +2025-01-26 07:41:38.683 | DEBUG | [] +2025-01-26 07:41:39.684 | DEBUG | [] +2025-01-26 07:41:40.683 | DEBUG | [] +2025-01-26 07:41:41.683 | DEBUG | [] +2025-01-26 07:41:42.684 | DEBUG | [] +2025-01-26 07:41:43.683 | DEBUG | [] +2025-01-26 07:41:44.697 | DEBUG | [] +2025-01-26 07:41:45.683 | DEBUG | [] +2025-01-26 07:41:46.682 | DEBUG | [] +2025-01-26 07:41:47.683 | DEBUG | [] +2025-01-26 07:41:48.684 | DEBUG | [] +2025-01-26 07:41:49.683 | DEBUG | [] +2025-01-26 07:41:50.681 | DEBUG | [] +2025-01-26 07:41:51.694 | DEBUG | [] +2025-01-26 07:41:52.682 | DEBUG | [] +2025-01-26 07:41:53.682 | DEBUG | [] +2025-01-26 07:43:24.872 | INFO | 日志记录器初始化完成 +2025-01-26 07:43:24.873 | INFO | 配置类初始化完成 +2025-01-26 07:43:24.874 | INFO | 程序配置管理模块初始化完成 +2025-01-26 07:43:26.989 | DEBUG | D:\程序开发\AUTO_MAA, D:\程序开发\AUTO_MAA\main.py +2025-01-26 07:43:27.017 | DEBUG | [] +2025-01-26 07:43:27.946 | DEBUG | [] +2025-01-26 07:43:28.948 | DEBUG | [] +2025-01-26 07:43:29.948 | DEBUG | [] +2025-01-26 07:43:30.951 | DEBUG | [] +2025-01-26 07:43:31.735 | INFO | 用户添加任务:调度队列_1 +2025-01-26 07:43:31.735 | INFO | 任务开始:调度队列_1 +2025-01-26 07:43:31.743 | INFO | 任务开始:脚本_2 +2025-01-26 07:43:32.055 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:32.948 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:33.948 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:35.032 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:35.948 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:36.947 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:37.956 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:38.947 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:39.946 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:40.946 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:42.024 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:42.946 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:43.952 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:44.996 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:43:45.804 | INFO | 中止任务:调度队列_1 +2025-01-26 07:43:45.809 | INFO | 申请中止本次任务 +2025-01-26 07:43:48.287 | INFO | 任务完成:脚本_2 +2025-01-26 07:43:48.294 | DEBUG | ['调度队列_1'] +2025-01-26 07:43:48.306 | INFO | 任务结束:调度队列_1 +2025-01-26 07:43:48.967 | DEBUG | [] +2025-01-26 07:43:49.963 | DEBUG | [] +2025-01-26 07:43:50.963 | DEBUG | [] +2025-01-26 07:43:51.963 | DEBUG | [] +2025-01-26 07:43:52.962 | DEBUG | [] +2025-01-26 07:43:53.962 | DEBUG | [] +2025-01-26 07:48:36.656 | INFO | 日志记录器初始化完成 +2025-01-26 07:48:36.657 | INFO | 配置类初始化完成 +2025-01-26 07:48:36.657 | INFO | 程序配置管理模块初始化完成 +2025-01-26 07:48:38.736 | DEBUG | D:\程序开发\AUTO_MAA, D:\程序开发\AUTO_MAA\main.py +2025-01-26 07:48:38.765 | DEBUG | [] +2025-01-26 07:48:39.748 | DEBUG | [] +2025-01-26 07:48:40.749 | DEBUG | [] +2025-01-26 07:48:41.743 | DEBUG | [] +2025-01-26 07:48:42.747 | DEBUG | [] +2025-01-26 07:48:43.744 | DEBUG | [] +2025-01-26 07:48:44.748 | DEBUG | [] +2025-01-26 07:48:45.748 | DEBUG | [] +2025-01-26 07:48:46.747 | DEBUG | [] +2025-01-26 07:48:47.748 | DEBUG | [] +2025-01-26 07:48:48.746 | DEBUG | [] +2025-01-26 07:48:49.747 | DEBUG | [] +2025-01-26 07:48:50.748 | DEBUG | [] +2025-01-26 07:48:51.745 | DEBUG | [] +2025-01-26 07:48:52.746 | DEBUG | [] +2025-01-26 07:48:53.746 | DEBUG | [] +2025-01-26 07:48:54.746 | DEBUG | [] +2025-01-26 07:48:55.746 | DEBUG | [] +2025-01-26 07:48:56.746 | DEBUG | [] +2025-01-26 07:48:57.747 | DEBUG | [] +2025-01-26 07:48:58.746 | DEBUG | [] +2025-01-26 07:48:59.746 | DEBUG | [] +2025-01-26 07:49:00.746 | DEBUG | [] +2025-01-26 07:49:01.745 | DEBUG | [] +2025-01-26 07:49:02.745 | DEBUG | [] +2025-01-26 07:49:03.745 | DEBUG | [] +2025-01-26 07:49:04.746 | DEBUG | [] +2025-01-26 07:49:05.744 | DEBUG | [] +2025-01-26 07:49:06.745 | DEBUG | [] +2025-01-26 07:49:07.744 | DEBUG | [] +2025-01-26 07:49:08.744 | DEBUG | [] +2025-01-26 07:49:09.746 | DEBUG | [] +2025-01-26 07:49:10.746 | DEBUG | [] +2025-01-26 07:49:11.745 | DEBUG | [] +2025-01-26 07:49:12.745 | DEBUG | [] +2025-01-26 07:49:13.744 | DEBUG | [] +2025-01-26 07:49:14.745 | DEBUG | [] +2025-01-26 07:49:15.744 | DEBUG | [] +2025-01-26 07:49:16.744 | DEBUG | [] +2025-01-26 07:49:17.744 | DEBUG | [] +2025-01-26 07:49:18.748 | DEBUG | [] +2025-01-26 07:49:19.750 | DEBUG | [] +2025-01-26 07:49:20.743 | DEBUG | [] +2025-01-26 07:49:21.749 | DEBUG | [] +2025-01-26 07:49:22.744 | DEBUG | [] +2025-01-26 07:49:23.749 | DEBUG | [] +2025-01-26 07:49:24.743 | DEBUG | [] +2025-01-26 07:49:25.748 | DEBUG | [] +2025-01-26 07:49:26.748 | DEBUG | [] +2025-01-26 07:49:27.748 | DEBUG | [] +2025-01-26 07:49:28.748 | DEBUG | [] +2025-01-26 07:49:29.749 | DEBUG | [] +2025-01-26 07:49:30.743 | DEBUG | [] +2025-01-26 07:49:31.743 | DEBUG | [] +2025-01-26 07:49:32.745 | DEBUG | [] +2025-01-26 07:49:33.745 | DEBUG | [] +2025-01-26 07:49:34.743 | DEBUG | [] +2025-01-26 07:49:35.743 | DEBUG | [] +2025-01-26 07:49:36.745 | DEBUG | [] +2025-01-26 07:49:37.745 | DEBUG | [] +2025-01-26 07:49:38.745 | DEBUG | [] +2025-01-26 07:49:39.744 | DEBUG | [] +2025-01-26 07:49:40.744 | DEBUG | [] +2025-01-26 07:49:41.745 | DEBUG | [] +2025-01-26 07:49:42.743 | DEBUG | [] +2025-01-26 07:49:43.746 | DEBUG | [] +2025-01-26 07:49:44.743 | DEBUG | [] +2025-01-26 07:49:45.745 | DEBUG | [] +2025-01-26 07:49:46.744 | DEBUG | [] +2025-01-26 07:49:47.746 | DEBUG | [] +2025-01-26 07:49:48.744 | DEBUG | [] +2025-01-26 07:49:49.745 | DEBUG | [] +2025-01-26 07:49:50.745 | DEBUG | [] +2025-01-26 07:49:51.743 | DEBUG | [] +2025-01-26 07:49:52.743 | DEBUG | [] +2025-01-26 07:49:53.744 | DEBUG | [] +2025-01-26 07:49:54.745 | DEBUG | [] +2025-01-26 07:49:55.751 | DEBUG | [] +2025-01-26 07:49:56.743 | DEBUG | [] +2025-01-26 07:49:57.744 | DEBUG | [] +2025-01-26 07:49:58.743 | DEBUG | [] +2025-01-26 07:49:59.744 | DEBUG | [] +2025-01-26 07:50:00.745 | DEBUG | [] +2025-01-26 07:50:01.744 | DEBUG | [] +2025-01-26 07:50:02.745 | DEBUG | [] +2025-01-26 07:50:03.744 | DEBUG | [] +2025-01-26 07:50:04.744 | DEBUG | [] +2025-01-26 07:50:05.744 | DEBUG | [] +2025-01-26 07:50:06.746 | DEBUG | [] +2025-01-26 07:50:07.742 | DEBUG | [] +2025-01-26 07:50:08.749 | DEBUG | [] +2025-01-26 07:50:09.750 | DEBUG | [] +2025-01-26 07:50:10.743 | DEBUG | [] +2025-01-26 07:50:11.748 | DEBUG | [] +2025-01-26 07:50:12.747 | DEBUG | [] +2025-01-26 07:50:13.744 | DEBUG | [] +2025-01-26 07:50:14.747 | DEBUG | [] +2025-01-26 07:50:15.745 | DEBUG | [] +2025-01-26 07:50:16.745 | DEBUG | [] +2025-01-26 07:50:17.889 | DEBUG | [] +2025-01-26 07:50:18.747 | DEBUG | [] +2025-01-26 07:50:19.747 | DEBUG | [] +2025-01-26 07:50:20.749 | DEBUG | [] +2025-01-26 07:50:21.749 | DEBUG | [] +2025-01-26 07:50:22.748 | DEBUG | [] +2025-01-26 07:50:23.747 | DEBUG | [] +2025-01-26 07:50:24.746 | DEBUG | [] +2025-01-26 07:50:25.744 | DEBUG | [] +2025-01-26 07:50:26.886 | DEBUG | [] +2025-01-26 07:50:27.886 | DEBUG | [] +2025-01-26 07:50:28.884 | DEBUG | [] +2025-01-26 07:50:29.885 | DEBUG | [] +2025-01-26 07:50:30.782 | INFO | 用户添加任务:调度队列_1 +2025-01-26 07:50:30.783 | INFO | 任务开始:调度队列_1 +2025-01-26 07:50:30.788 | INFO | 任务开始:脚本_2 +2025-01-26 07:50:30.997 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:50:31.885 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:50:32.885 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:50:34.041 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:50:34.883 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:50:35.884 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:50:36.878 | INFO | 中止任务:调度队列_1 +2025-01-26 07:50:36.880 | INFO | 申请中止本次任务 +2025-01-26 07:50:41.715 | INFO | 任务完成:脚本_2 +2025-01-26 07:50:41.717 | DEBUG | ['调度队列_1'] +2025-01-26 07:50:41.720 | INFO | 任务结束:调度队列_1 +2025-01-26 07:50:41.885 | DEBUG | [] +2025-01-26 07:50:42.884 | DEBUG | [] +2025-01-26 07:50:43.883 | DEBUG | [] +2025-01-26 07:50:44.885 | DEBUG | [] +2025-01-26 07:50:45.883 | DEBUG | [] +2025-01-26 07:50:46.883 | DEBUG | [] +2025-01-26 07:50:47.883 | DEBUG | [] +2025-01-26 07:50:48.884 | DEBUG | [] +2025-01-26 07:56:21.015 | INFO | 日志记录器初始化完成 +2025-01-26 07:56:21.016 | INFO | 配置类初始化完成 +2025-01-26 07:56:21.016 | INFO | 程序配置管理模块初始化完成 +2025-01-26 07:56:23.010 | DEBUG | D:\程序开发\AUTO_MAA, D:\程序开发\AUTO_MAA\main.py +2025-01-26 07:56:23.039 | DEBUG | [] +2025-01-26 07:56:23.087 | DEBUG | [] +2025-01-26 07:56:24.087 | DEBUG | [] +2025-01-26 07:56:25.092 | DEBUG | [] +2025-01-26 07:56:26.091 | DEBUG | [] +2025-01-26 07:56:27.088 | DEBUG | [] +2025-01-26 07:56:27.351 | INFO | 用户添加任务:调度队列_1 +2025-01-26 07:56:27.352 | INFO | 任务开始:调度队列_1 +2025-01-26 07:56:27.357 | INFO | 任务开始:脚本_2 +2025-01-26 07:56:28.092 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:56:29.189 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:56:30.087 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:56:30.863 | INFO | 中止任务:调度队列_1 +2025-01-26 07:56:30.866 | INFO | 申请中止本次任务 +2025-01-26 07:56:34.083 | INFO | 任务完成:脚本_2 +2025-01-26 07:56:34.084 | DEBUG | ['调度队列_1'] +2025-01-26 07:56:34.087 | INFO | 任务结束:调度队列_1 +2025-01-26 07:56:34.097 | DEBUG | [] +2025-01-26 07:56:35.091 | DEBUG | [] +2025-01-26 07:56:36.091 | DEBUG | [] +2025-01-26 07:56:37.090 | DEBUG | [] +2025-01-26 07:56:38.091 | DEBUG | [] +2025-01-26 07:56:39.091 | DEBUG | [] +2025-01-26 07:56:40.091 | DEBUG | [] +2025-01-26 07:56:41.090 | DEBUG | [] +2025-01-26 07:56:42.090 | DEBUG | [] +2025-01-26 07:56:43.089 | DEBUG | [] +2025-01-26 07:56:44.089 | DEBUG | [] +2025-01-26 07:56:45.090 | DEBUG | [] +2025-01-26 07:56:46.089 | DEBUG | [] +2025-01-26 07:56:47.088 | DEBUG | [] +2025-01-26 07:56:48.087 | DEBUG | [] +2025-01-26 07:56:49.088 | DEBUG | [] +2025-01-26 07:56:50.088 | DEBUG | [] +2025-01-26 07:56:51.089 | DEBUG | [] +2025-01-26 07:56:52.088 | DEBUG | [] +2025-01-26 07:56:52.580 | INFO | 用户添加任务:调度队列_1 +2025-01-26 07:56:52.580 | INFO | 任务开始:调度队列_1 +2025-01-26 07:56:52.585 | INFO | 任务开始:脚本_2 +2025-01-26 07:56:53.087 | DEBUG | ['调度队列_1', '脚本_2'] +2025-01-26 07:56:53.750 | INFO | 中止任务:调度队列_1 +2025-01-26 07:56:53.754 | INFO | 申请中止本次任务 +2025-01-26 07:56:56.417 | INFO | 任务完成:脚本_2 +2025-01-26 07:56:56.419 | DEBUG | ['调度队列_1'] +2025-01-26 07:56:56.422 | INFO | 任务结束:调度队列_1 +2025-01-26 07:56:57.086 | DEBUG | [] +2025-01-26 07:56:58.087 | DEBUG | [] +2025-01-26 07:56:59.088 | DEBUG | [] +2025-01-26 07:57:00.087 | DEBUG | [] +2025-01-26 07:57:01.087 | DEBUG | [] +2025-01-26 07:57:02.087 | DEBUG | [] +2025-01-26 07:57:03.088 | DEBUG | [] +2025-01-26 07:57:04.088 | DEBUG | [] +2025-01-26 07:57:05.093 | DEBUG | [] +2025-01-26 07:57:06.086 | DEBUG | [] diff --git a/main.py b/main.py index 19654f2..f311092 100644 --- a/main.py +++ b/main.py @@ -31,31 +31,18 @@ from PySide6.QtCore import Qt from qfluentwidgets import FluentTranslator import sys -from app.core import AppConfig -from app.services.notification import Notification -from app.services.security import CryptoHandler -from app.services.system import SystemHandler -from app.ui.main_window import AUTO_MAA if __name__ == "__main__": - config = AppConfig() - notify = Notification(config) - crypto = CryptoHandler(config) - system = SystemHandler(config) - - QApplication.setAttribute(Qt.AA_DontCreateNativeWidgetSiblings) application = QApplication(sys.argv) + QApplication.setAttribute(Qt.AA_DontCreateNativeWidgetSiblings) translator = FluentTranslator() application.installTranslator(translator) - window = AUTO_MAA( - config=config, - notify=notify, - crypto=crypto, - system=system, - ) + from app.ui.main_window import AUTO_MAA + + window = AUTO_MAA() window.show_ui("显示主窗口") window.start_up_task() sys.exit(application.exec())