feat: 添加阈值检查脚本,输出默认阈值及匹配结果
refactor: 优化代码格式,调整条件表达式为多行 fix: 更新预定状态,移除已参加的预定
This commit is contained in:
1 parent
804a9224ca
commit
4f0e8c364d
4 files changed
+53
-6
No files matched your search
+1
-1
@@ -191,4 +191,4 @@
|
||||
"enable_streaming_screenshot": false,
|
||||
"fudai_exit_after_misses": 30,
|
||||
"yanghao_only": false
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,37 @@
|
||||
{
|
||||
"updated_ts": 1767491032.6326447,
|
||||
"reason": "startup_clear",
|
||||
"updated_ts": 1767491197.3733354,
|
||||
"reason": "remove_reservation_after_attend",
|
||||
"room_pos": 0,
|
||||
"current_room_title": "",
|
||||
"current_room_title_raw": "",
|
||||
"reservations": []
|
||||
}
|
||||
"reservations": [
|
||||
{
|
||||
"prize_value_yuan": 6999.0,
|
||||
"content": "",
|
||||
"future_ts": 1767491410.899574,
|
||||
"future_str": "2026-01-04 09:50:10",
|
||||
"pos_seen": 0,
|
||||
"room_title": "彩虹夫妇",
|
||||
"room_title_raw": "彩虹夫妇",
|
||||
"created_ts": 1767491052.272007,
|
||||
"task_count": 2,
|
||||
"time_text": "06:04",
|
||||
"participants": 0,
|
||||
"copies": 0
|
||||
},
|
||||
{
|
||||
"prize_value_yuan": 5999.0,
|
||||
"content": "",
|
||||
"future_ts": 1767491526.677024,
|
||||
"future_str": "2026-01-04 09:52:06",
|
||||
"pos_seen": 3,
|
||||
"room_title": "刘媛媛媛",
|
||||
"room_title_raw": "刘媛媛.媛",
|
||||
"created_ts": 1767491172.3842542,
|
||||
"task_count": 2,
|
||||
"time_text": "06:00",
|
||||
"participants": 0,
|
||||
"copies": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
+5
-1
@@ -417,7 +417,11 @@ def main(argv: list[str]) -> int:
|
||||
device_id, analyser.resolution_ratio_x, analyser.resolution_ratio_y
|
||||
)
|
||||
)
|
||||
seconds = int(args.yanghao_seconds) if getattr(args, "yanghao_seconds", None) else analyser._yanghao_get_recommend_seconds()
|
||||
seconds = (
|
||||
int(args.yanghao_seconds)
|
||||
if getattr(args, "yanghao_seconds", None)
|
||||
else analyser._yanghao_get_recommend_seconds()
|
||||
)
|
||||
if seconds < 1:
|
||||
seconds = 1
|
||||
getattr(analyser, "_yanghao_recommend_flow", lambda _: None)(seconds) # type: ignore[attr-defined]
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
from douyin.core.douyin_fudai import fudai_analyse
|
||||
from path_config import get_like_template_path, get_fav_template_path
|
||||
|
||||
a = fudai_analyse()
|
||||
print("default threshold", a.yanghao_icon_match_threshold)
|
||||
like_roi = "pic/roi_test_like_20260104000913_1767456556.png"
|
||||
fav_roi = "pic/roi_test_fav_20260104000916_1767456559.png"
|
||||
like_tpl = get_like_template_path()
|
||||
fav_tpl = get_fav_template_path()
|
||||
print("Like match (default):", a._match_icon_template(like_roi, like_tpl))
|
||||
print("Fav match (default):", a._match_icon_template(fav_roi, fav_tpl))
|
||||
a.yanghao_icon_match_threshold = 0.5
|
||||
print("Like match (thr=0.5):", a._match_icon_template(like_roi, like_tpl))
|
||||
print("Fav match (thr=0.5):", a._match_icon_template(fav_roi, fav_tpl))
|
||||
Reference in new issue
Block a user