Codex and Claude Opus 4.7
d5c9936c88
gui_app + base_interface: 内部错误 print → logger
...
gui/gui_app.py(8 处 sys.stderr print → _LOGGER):
- 配置读取失败、日志文件权限/写入错误(warning/error 级)
- pump_logs 内日志插入失败、循环异常、调度下次更新失败(error/warning 级)
- 顶部 import logging + 模块级 _LOGGER
douyin/core/fudai_modules/base_interface.py(2 处 print → _LOGGER):
- BaseFudaiMixin._safe_log 在主类无 _enhanced_log_kv 时的兜底改为 logger.info
- 顶部 import logging + 模块级 _LOGGER
保留为 stdout 的合理场景:
- bin/run_cli.py 的 [TEST]/[YANGHAO-ONLY] CLI 输出
- bin/manage_logs.py 的 CLI 工具输出
- gui/webgui_launcher.py: GUI 同时把 log 输出到控制台
- douyin/logging/internal_loggers.py: logger 模块自身的初始化失败兜底
- douyin/logging/douyin_logging{,_wrapper}.py: 日志系统内部的格式化输出
回归:140 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过;
gui.gui_app/web_gui/gui_core/base_interface 全部可加载,_LOGGER 名称正确。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 11:43:44 +08:00
Codex
0131be7869
切换 OCR 默认引擎到 PaddleOCR v4-mobile 并简化预处理
...
- 默认引擎改为 PaddleOCR PP-OCRv4_mobile(实测 369ms/张,比 EasyOCR 629ms 更快且精度大幅提升,coupon 等关键图错字一片 -> 全对)
- EasyOCR 仅作回退,移除"小图自动放大+锐化+对比度增强"预处理(实测对 Paddle 是负优化,会引入伪影/重复字)
- analyse_pic_word 加 LRU 内容哈希缓存(256 条),重复读图直接命中
- analyse_pic_digits 从 200 行重复实现精简成 30 行委托 + 数字过滤
- 统一两处 OCR 初始化为 _build_paddle / _build_easyocr 工厂,消除重复
- 设置 FLAGS_use_mkldnn=false 绕开 Win + Paddle 3.x 的 oneDNN+PIR 不兼容 bug(实测 FLAGS_enable_pir_in_executor=0 也修不掉,关 oneDNN 是当前唯一可行解)
- 决策依据/速度数据/已知问题归档到 docs/ocr_engine_decision.md
- 业务接口完全向后兼容
2026-05-21 10:50:30 +08:00
Codex and Claude Opus 4.7
71f3653354
补回上次合并丢失的关键路径修复 + .gitignore 补强 + 依赖版本对齐
...
上次冲突解决时跳过了 982f57e (P0 清理) 和 b6ae970 (路径修复) 两个 commit,
本提交补回其中影响运行时正确性和文档一致性的 7 处。
E. 路径错位修复
- douyin/core/douyin_fudai.py: _reservations_state_path 与 room_pos_map
状态目录改为优先调用 path_config.get_reservations_path()
- douyin/core/path_config.py: get_reservations_path 注释明确"实际位置 + 写入方"
- gui/components/mapping_utils.py: 删除错误兜底 douyin/state/reservations.json
- gui/components/mapping_table.py: 同步删除 douyin/state/room_pos_map.json 错误兜底
- gui/web_gui.py: get_reservations() 内的兜底由 douyin/state/ 修正为 douyin/core/state/
- bin/run_cli.py: 移除对已删空文件 douyin_reservation_ops.py 的 shim 加载
- douyin/reservation/douyin_reservation_ops.py: 删除 0 字节空文件
F. .gitignore 补强
- 新增 *.bak_* 拦截带日期后缀的备份命名(修复 *.bak 命中失败的场景)
G. 依赖版本对齐
- requirements-minimal.txt: paddleocr/paddlepaddle 改为 >=3.0.0,与 requirements.txt 一致
- README.md: 安装指引中 paddlepaddle==2.5.2 改为 >=3.0.0
回归:全量 .py compileall 通过;7 项断言(path_config 路径、douyin_fudai 切换、
3 处兜底已清、shim 已移除、空文件已删、.gitignore 补强、版本对齐)全部 PASS;
test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 10:18:17 +08:00
zzz
2e811e71b3
Merge branch 'main' into claude/wonderful-brattain-d1cfe0
2026-05-21 09:58:24 +08:00
Codex and Claude Opus 4.7
96f8600d42
小批量收尾:删除零引用 scrcpy_screenshot + douyin_fudai/log_viewer print→logger
...
- 删除 operations/scrcpy_screenshot.py(100 行,仅自身定义自身使用,全仓零外部引用)
- douyin/core/douyin_fudai.py:3 处兜底 print → logging.info/warning(_log_kv 失败时的兜底路径)
- gui/components/log_viewer.py:2 处错误 print → _LOGVIEW_LOGGER.exception(日志线程异常 / 刷新显示异常)
回归:149→148 .py,全量编译通过;test_filter_logging / check_web_gui_config_sync 通过;
fudai_analyse 类正常导出,log_viewer 模块加载 OK。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:40:18 +08:00
Codex and Claude Opus 4.5
2d6cbecf7e
refactor: 抽取 underlying_operations 顶部辅助函数到 io_utils.py
...
将 4 个模块级辅助函数及相关常量从 underlying_operations.py 抽离到
新建的 douyin/core/io_utils.py:
- _verify_png_integrity
- _safe_replace_file
- _ensure_parent_dir
- _mirror_screenshot_to_external
- _EXTERNAL_DOUYIN_FUDAI_DIR / _EXTERNAL_AXF_SCREENSHOT
underlying_operations.py 仍重新导出这些符号,保持向后兼容,
所有外部 import 无需修改。
文件行数:3508 -> 3342(减 166 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:01:14 +08:00
Codex and Claude Opus 4.5
8fe7ff0585
refactor: 根目录核心模块迁移到 douyin/core/ 和 douyin/logging/
...
将 4 个根目录核心模块迁移到合理位置:
- path_config.py -> douyin/core/path_config.py
- version.py -> douyin/core/version.py
- Underlying_Operations.py -> douyin/core/underlying_operations.py
- unified_logger.py -> douyin/logging/unified_logger.py
配套更新所有 import:
- path_config: 41 处 import 改为 douyin.core.path_config
- version: 4 处改为 douyin.core.version
- unified_logger: 5 处改为 douyin.logging.unified_logger
- Underlying_Operations: 14 处改为 douyin.core.underlying_operations
修复 path_config.PROJECT_ROOT 计算(向上 2 级而非当前目录)。
验证:python -m compileall 全项目通过。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 00:23:14 +08:00
Codex and Claude Opus 4.5
92718a7cb4
fix: douyin_fudai 关键路径异常添加日志
...
- run_id 生成失败时记录 logging.debug
- 日志系统初始化失败时记录 logging.warning,便于排查
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 23:03:27 +08:00
Codex and Claude Opus 4.5
ff8de2c9b8
fix: 修复7个Critical并发安全和异常处理问题
...
1. OCR 单例无锁保护 - 添加 _ocr_lock 和 _ocr_coords_lock
2. ADB 文本广播命令注入 - 使用 shlex.quote() 转义
3. 截图文件 Race Condition - 添加 PNG 完整性验证
4. JSON 持久化无锁 - 添加文件级锁字典
5. 双检查锁不完整 - 修复 _ensure_debug_save_worker_started
6. Daemon 线程无 Graceful Shutdown - 添加 shutdown event 和 atexit
7. 关键路径异常处理 - 添加 logging.debug 替代 pass
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:25:35 +08:00
Codex
e7a7d3f888
Fix device selection and adb command safety
2026-05-20 18:43:58 +08:00
Your Name
68e3f2ff34
优化:调整配置文件中的重置动作和点击等待时间,提升代码逻辑清晰度;更新福袋分析逻辑以改善预约处理流程
2026-01-22 13:40:34 +08:00
Your Name
3b4293365d
优化:调整日志保留天数和压缩设置,增强日志管理;添加预约记录检查逻辑,避免直播间循环
2026-01-18 15:20:21 +08:00
Your Name
96c5cd50ec
优化:调整_mapping_tree_columns函数的格式,提升代码可读性
2026-01-18 13:42:20 +08:00
Your Name
27bb48c881
优化:增加连续失败处理逻辑,避免直播间卡死;调整抽奖参与逻辑,限制重试次数;添加购物红包OCR复查功能
2026-01-18 13:36:12 +08:00
Your Name
5519deb11b
参与: 添加连续失败上限,避免卡死在无法识别的福袋上
2026-01-18 00:03:06 +08:00
Your Name
4b9b6cdf8f
优化预约和滑动处理逻辑
2026-01-17 21:35:32 +08:00
Your Name
54a99d4bbd
feat: 优化代码格式,提升可读性和一致性
2026-01-17 18:07:43 +08:00
Your Name
3fbd2b2d85
feat: 调整高价值福袋参与阈值,优化预约逻辑以提升用户体验
2026-01-17 09:26:41 +08:00
Your Name
c091e4d3f0
feat: 优化当前福袋内容标识的设置逻辑,增强代码可读性
2026-01-17 09:08:23 +08:00
Your Name
716567dbb0
feat: 优化预约福袋参与逻辑,修复锁定期处理和映射表记录,新增重复标题去重功能
2026-01-17 08:43:21 +08:00
Your Name
ca77862a86
feat: 添加滑动坐标配置功能,优化滑动操作的灵活性
2026-01-16 19:18:37 +08:00
Your Name
8d31e0ba1a
feat: 启用杨浩功能并调整日志时间戳设置为系统时间
2026-01-16 17:46:09 +08:00
Your Name
575d6f3fd5
feat: 添加按钮文本过滤功能以优化筛选逻辑,并支持真实时间戳记录
2026-01-16 16:50:19 +08:00
Your Name
de2fb909a9
feat: 清理旧截图文件以避免复用过期截图,并优化截图文件检查逻辑
...
- 在程序启动时清理旧截图文件
- 在记录映射表前清理截图文件
- 增强截图文件过期检查(30秒超时)
- 避免程序启动时复用低置信度的过期截图
2026-01-16 16:30:40 +08:00
Your Name
e091db7a54
feat: 清理旧截图文件以避免复用过期截图,并优化截图文件检查逻辑
2026-01-16 16:25:01 +08:00
Your Name
7c839c5d39
feat: 优化直播间标题识别逻辑,增强缓存管理和错误处理
2026-01-16 16:15:40 +08:00
Your Name
da098fafdc
feat: 更新福袋相关配置,优化任务数量处理逻辑,增强映射表记录功能
2026-01-16 12:53:59 +08:00
Your Name
3723c39a58
feat: 优化福袋详情记录逻辑,提升代码可读性
2026-01-16 03:44:53 +08:00
Your Name
362b7c841c
fix: 修复代码格式问题,提升可读性
2026-01-16 02:31:34 +08:00
Your Name
78e53603d3
feat: 添加开奖等待时间戳,优化参与逻辑中的状态管理
2026-01-16 02:18:50 +08:00
Your Name
ea1e3dd876
Refactor fudai detection and logging mechanisms
...
- Improved logging for task count retrieval and warnings in `douyin_fudai_core.py` and `douyin_stage.py`.
- Enhanced error handling and logging in `fudai_detail_reader.py` to provide clearer insights when task counts are not saved.
- Updated template matching logic in `douyin_detection.py` to include detailed logging and error handling for template loading and matching processes.
- Refactored screenshot handling and debugging paths to ensure better traceability and error reporting.
- Adjusted default task count values to zero where applicable to prevent unintended behavior.
2026-01-16 02:08:01 +08:00
Your Name
83704f3cb8
feat: 优化 find_and_open_fudai_detail 函数中的代码格式,提升可读性
2026-01-15 23:04:22 +08:00
Your Name
c46c1402b5
feat: 优化基本加入决策函数中的导入和代码格式,提升可读性
2026-01-15 23:04:09 +08:00
Your Name
d2c5ca57e8
feat: 更新房间状态管理,优化直播间标题记录逻辑,移除过时的房间位置映射文件
2026-01-15 23:03:56 +08:00
Your Name
073ad13781
feat: 添加房间位置映射文件,更新房间标题信息
2026-01-15 16:51:11 +08:00
Your Name
d1f675073f
feat: 更新房间位置映射表,修改标题为海宁齐总
2026-01-15 16:19:08 +08:00
Your Name
504410f7b9
feat: 优化映射表加载与导出功能,确保数据一致性与可视化更新
2026-01-15 16:18:10 +08:00
Your Name
2358682216
feat: 添加持久化映射加载和状态文件序列化功能,优化 GUI 显示
2026-01-15 14:25:54 +08:00
Your Name
e39a984260
feat: 优化养号流程调用,确保向后兼容
2026-01-15 03:15:33 +08:00
Your Name
e898202a90
refactor: 优化代码格式,提升可读性
2026-01-15 03:04:03 +08:00
Your Name
ea77c0b501
refactor: 优化代码格式,提升可读性
2026-01-15 00:20:17 +08:00
Your Name
d36b73d3df
feat: 添加养号模式下的桌面检测和自救恢复功能;优化评论操作和定时触发逻辑
2026-01-15 00:19:42 +08:00
Your Name
245e721c94
feat: 优化代码格式,增加换行以提高可读性
2026-01-11 23:32:19 +08:00
Your Name
54f3b35a26
Refactor code structure for improved readability and maintainability
2026-01-11 23:31:38 +08:00
Your Name
51eced1346
refactor: 优化基础参与决策函数的参数格式,提高代码可读性
2026-01-08 22:04:11 +08:00
Your Name
6ecd9fa1ae
refactor: 优化代码格式,提升可读性
2026-01-08 20:39:04 +08:00
Your Name
fb0c07c91a
Add shopping red packet detection tests and sample image
...
- Implemented a test script for shopping red packet detection using pixel analysis and OCR.
- Created a sample image to simulate a shopping red packet for testing purposes.
- Added functions to test pixel detection, coordinate definitions, and OCR keyword matching.
- Included detailed print statements for test results and summaries.
2026-01-08 20:37:49 +08:00
Your Name
b3011dd9ce
feat: Implement high-value room revisit feature and enhance fudai tracking
...
- Added tracking for previously seen fudai in Runner and ProcRunner classes to avoid duplicate recognition.
- Extracted room title during fudai recognition for better tracking.
- Updated high_value_rooms.json with new room entries and adjusted total count.
- Introduced new GUI elements for configuring icon coordinates in webui.
- Created comprehensive documentation for the high-value room revisit functionality.
- Added tests for delay settings and icon detection logic to ensure functionality.
- Implemented a tool for analyzing step times in logs to identify performance bottlenecks.
2026-01-08 14:27:38 +08:00
Your Name
47e1a0cb2c
refactor: 优化代码格式,提升可读性和一致性
2026-01-08 00:15:40 +08:00
Your Name
5738d29bd6
feat: 添加预约回退功能完整测试脚本和错误场景测试脚本
2026-01-08 00:15:00 +08:00