feat(计划): 评论计划勾选项 + 待评论计数

- ae_plan 新增 comment_mode(schema v26)
- 计划编辑器勾「评论计划」:账号显示待评论 N、隐藏视频未发/素材区,段内禁止发布素材
- list_accounts 带 comment_pending;comment.pending_counts 按账号汇总
- 计划列表显示评论待处理总数与「评论」标签
- 测试 test_comment/test_plan
This commit is contained in:
2026-10-31 10:12:34 +08:00
parent d5114dbf53
commit b9bee52878
11 changed files with 134 additions and 19 deletions
+3
View File
@@ -64,6 +64,7 @@ DEFAULT_PLAN = {
"ready": {},
"prep_action_id": "", # 空 = 用该 App 的开场动作(opening_for)
"prep_check": True, # 触发前预检:账号库没有 / 设备没入池 / 离线 → 跳过并写明原因
"comment_mode": False, # 评论计划:页面按评论数据计数,不显示视频未发
"account_ids": [], # 账号库 DeviceAccount.id
"accounts": [], # 名字(展示 + 账号被删后还能说明)
"target": {}, # 可选 {"map": {"账号名": "A01"}} 人工指定设备
@@ -252,6 +253,8 @@ def save_plan(data, plan_id=""):
row.set_json("ready", clean_ready(data.get("ready")))
row.prep_action_id = (data.get("prep_action_id") or "").strip()
row.prep_check = bool(data.get("prep_check", True))
if data.get("comment_mode") is not None:
row.comment_mode = bool(data.get("comment_mode"))
row.preempt = bool(data.get("preempt", False))
row.max_parallel = max(0, int(data.get("max_parallel") or 0))
row.note = data.get("note") or ""