From de2fb909a996dd165b825d93617976891eba65d3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 16 Jan 2026 16:30:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B8=85=E7=90=86=E6=97=A7=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=E6=96=87=E4=BB=B6=E4=BB=A5=E9=81=BF=E5=85=8D=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E8=BF=87=E6=9C=9F=E6=88=AA=E5=9B=BE=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=88=AA=E5=9B=BE=E6=96=87=E4=BB=B6=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在程序启动时清理旧截图文件 - 在记录映射表前清理截图文件 - 增强截图文件过期检查(30秒超时) - 避免程序启动时复用低置信度的过期截图 --- douyin/core/douyin_fudai.py | 1 + douyin/reservation/douyin_reservation_handler.py | 1 + fudai_detail_modules/fudai_detail_room_title.py | 1 + 3 files changed, 3 insertions(+) diff --git a/douyin/core/douyin_fudai.py b/douyin/core/douyin_fudai.py index abba4cc..6afcdd0 100644 --- a/douyin/core/douyin_fudai.py +++ b/douyin/core/douyin_fudai.py @@ -562,6 +562,7 @@ class fudai_analyse: try: import path_config import os + pic_path = path_config.get_screenshot_path() if os.path.exists(pic_path): os.remove(pic_path) diff --git a/douyin/reservation/douyin_reservation_handler.py b/douyin/reservation/douyin_reservation_handler.py index 0e41d73..d775dbf 100644 --- a/douyin/reservation/douyin_reservation_handler.py +++ b/douyin/reservation/douyin_reservation_handler.py @@ -228,6 +228,7 @@ class ReservationHandler: try: import path_config import os + pic_path = path_config.get_screenshot_path() if os.path.exists(pic_path): os.remove(pic_path) diff --git a/fudai_detail_modules/fudai_detail_room_title.py b/fudai_detail_modules/fudai_detail_room_title.py index 86be297..17b8cfa 100644 --- a/fudai_detail_modules/fudai_detail_room_title.py +++ b/fudai_detail_modules/fudai_detail_room_title.py @@ -218,6 +218,7 @@ def read_live_room_title_core( if os.path.exists(pic_path) and os.path.getsize(pic_path) >= 1024: # 检查文件修改时间,避免复用过期的截图(超过30秒的认为过期) import time + file_mtime = os.path.getmtime(pic_path) current_time = time.time() if current_time - file_mtime > 30: