From 0862a92dc53d0516be5537d5403c6fe9c83e6f5e Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 15 Jan 2026 23:04:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=20diagnose=5Fstage?= =?UTF-8?q?=5Ffrom=5Fcurrent=5Fscreen=20=E5=87=BD=E6=95=B0=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=A0=BC=E5=BC=8F=EF=BC=8C=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douyin/stage/douyin_stage.py | 7 ++++++- douyin/stage/douyin_stage_handler.py | 4 +++- gui/gui_app.py | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/douyin/stage/douyin_stage.py b/douyin/stage/douyin_stage.py index 0af4698..e431f4c 100644 --- a/douyin/stage/douyin_stage.py +++ b/douyin/stage/douyin_stage.py @@ -83,7 +83,12 @@ def diagnose_stage_from_current_screen(analyser, trigger_reason="unknown"): # t # 输出开始分隔符与起始信息 print(f"[DEBUG] 阶段诊断开始: trigger_reason={trigger_reason}") _log_separator("开始阶段诊断") - _log_summary("开始阶段诊断", 最大诊断时间秒=max_diag_time, 单步最大耗时秒=max_step_time, 触发原因=trigger_reason) + _log_summary( + "开始阶段诊断", + 最大诊断时间秒=max_diag_time, + 单步最大耗时秒=max_step_time, + 触发原因=trigger_reason, + ) # ========== 步骤0:首先执行并行检测(包括直播间图标检测)========== step_start = time.time() diff --git a/douyin/stage/douyin_stage_handler.py b/douyin/stage/douyin_stage_handler.py index 5d5e0cb..b6c2cb6 100644 --- a/douyin/stage/douyin_stage_handler.py +++ b/douyin/stage/douyin_stage_handler.py @@ -42,7 +42,9 @@ class StageHandler: except Exception: pass # 截图失败时继续使用现有截图 - result = douyin_stage.diagnose_stage_from_current_screen(analyser, trigger_reason) + result = douyin_stage.diagnose_stage_from_current_screen( + analyser, trigger_reason + ) if result is None: return ("IN_LIVE_ROOM", "阶段诊断返回 None,默认判定为在直播间") return result diff --git a/gui/gui_app.py b/gui/gui_app.py index 663b84c..db1c960 100644 --- a/gui/gui_app.py +++ b/gui/gui_app.py @@ -391,7 +391,6 @@ def main(): left_notebook.pack(fill=BOTH, expand=True) # 左侧 Notebook 中不再添加映射表页(已移至右侧) - needswitch_var = tk.BooleanVar(value=bool(cfg.get("needswitch", True))) infinite_loop_var = tk.BooleanVar( value=bool(cfg.get("infinite_loop_enabled", False))