fix: 优化静默进程标记逻辑

This commit is contained in:
DLmaster361
2025-07-31 13:39:38 +08:00
parent 67c41ab3ee
commit c5f947e14a
8 changed files with 34 additions and 44 deletions

View File

@@ -275,11 +275,11 @@ class QueueConfig(LQConfig):
def __init__(self) -> None:
super().__init__()
self.queueSet_Name = ConfigItem("QueueSet", "Name", "")
self.queueSet_TimeEnabled = ConfigItem(
self.QueueSet_Name = ConfigItem("QueueSet", "Name", "")
self.QueueSet_TimeEnabled = ConfigItem(
"QueueSet", "TimeEnabled", False, BoolValidator()
)
self.queueSet_AfterAccomplish = OptionsConfigItem(
self.QueueSet_AfterAccomplish = OptionsConfigItem(
"QueueSet",
"AfterAccomplish",
"NoAction",
@@ -705,7 +705,7 @@ class AppConfig(GlobalConfig):
self.main_window = None
self.PASSWORD = ""
self.running_list = []
self.silence_list = []
self.silence_dict: Dict[Path, datetime] = {}
self.info_bar_list = []
self.stage_dict = {
"ALL": {"value": [], "text": []},

View File

@@ -380,14 +380,14 @@ class _TaskManager(QObject):
# 根据调度队列情况设置电源状态
if (
Config.queue_dict[name]["Config"].get(
Config.queue_dict[name]["Config"].queueSet_AfterAccomplish
Config.queue_dict[name]["Config"].QueueSet_AfterAccomplish
)
!= "NoAction"
and Config.power_sign == "NoAction"
):
Config.set_power_sign(
Config.queue_dict[name]["Config"].get(
Config.queue_dict[name]["Config"].queueSet_AfterAccomplish
Config.queue_dict[name]["Config"].QueueSet_AfterAccomplish
)
)

View File

@@ -79,7 +79,7 @@ class _MainTimer(QObject):
for name, info in Config.queue_dict.items():
if not info["Config"].get(info["Config"].queueSet_TimeEnabled):
if not info["Config"].get(info["Config"].QueueSet_TimeEnabled):
continue
data = info["Config"].toDict()
@@ -114,9 +114,12 @@ class _MainTimer(QObject):
emulator_windows = []
for window in windows:
for emulator_path in Config.silence_list:
# 此处排除雷电名为新通知的窗口
if str(emulator_path) in window and window[0] != "新通知":
for emulator_path, endtime in Config.silence_dict.items():
if (
datetime.now() < endtime
and str(emulator_path) in window
and window[0] != "新通知" # 此处排除雷电名为新通知的窗口
):
emulator_windows.append(window)
if emulator_windows: