feat: 片段分割与合并 - 时间线剪刀工具后端能力 #393

Merged
xiaoxia merged 3 commits from feat/clip-split-merge into develop 2026-07-17 09:18:30 +08:00

3 Commits

Author SHA1 Message Date
CI Bot b19a0a3454 fix: 修复edit_plans.py语法错误,分割合并路由迁移到edit_plans_clips.py
CI Build & Deploy Pipeline / Build Staging API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Production (pull_request) Has been skipped
CI Build & Deploy Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 31s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 54s
AI Code Review / AI Code Review (pull_request) Successful in 2m9s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 2m21s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 2m21s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m23s
- 修复save_plan_as_template函数被截断导致的SyntaxError
- 分割/合并路由从edit_plans.py迁移到edit_plans_clips.py子路由
- 统一使用_check_plan_access和_get_svc辅助函数
- 2234个单测全绿
2026-07-17 08:09:17 +08:00
CI Bot 5fbf3abebb style: auto-format with black + isort (runner env) 2026-07-17 07:57:27 +08:00
CI Bot d73f0d88b5 feat: 片段分割与合并 - 时间线剪刀工具后端能力
- EditPlanService.split_clip(): 指定时间点一分为二
  - 自动重排后续片段 order
  - 素材片段自动加 trim_start/trim_end
  - 属性完整继承(类型/转场/速度/config)
- EditPlanService.merge_clips(): 连续同类型片段合并
  - 校验:同计划/连续order/同类型/至少2个
  - 时长累加、文案拼接、config合并
  - 自动清理 trim 字段、重排后续 order
- API: POST /clips/{id}/split + POST /clips/merge
  - 项目级权限校验
- 17个单元测试全覆盖
2026-07-17 07:57:22 +08:00