Compare commits

...

3 Commits

Author SHA1 Message Date
xiaoxia 1b2fe95854 Merge branch 'develop' into fix/smart-match-empty-results
AI Code Review / AI Code Review (pull_request) Successful in 2m11s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 3m21s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 3m12s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 4m20s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 3m2s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 5m53s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 6s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 7s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m17s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m0s
CI/CD Pipeline / CI Gate (pull_request) Successful in 7s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 362h28m50s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 362h28m52s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 362h28m54s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 362h28m56s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 362h28m58s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 362h29m0s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 362h29m0s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 362h29m2s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 362h29m6s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 362h29m6s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 362h29m8s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 362h29m10s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 362h29m4s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 362h29m4s
CI/CD Pipeline / Validate - Security (pull_request) Failing after 362h29m5s
CI/CD Pipeline / Validate - Style (pull_request) Failing after 362h29m6s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 362h29m13s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 363h3m9s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 363h3m13s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 363h3m15s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 363h3m19s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Failing after 363h3m21s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 363h3m23s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 363h3m27s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 363h3m19s
2026-09-01 12:31:18 +08:00
xiaoxia 1a2c4b89be feat(title): 标题自由位置拖拽后端支持——pos_x/pos_y 注入 \pos 定位 (#1592)
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Has been cancelled
CI/CD Pipeline / Check if frontend-only change (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / PR Build API Image (push) Has been cancelled
CI/CD Pipeline / PR Build Web Image (push) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (push) Has been cancelled
CI/CD Pipeline / Check push changed paths (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
2026-09-01 12:31:11 +08:00
xiaoxia 24f1ca35d5 fix(smart-match): limit 算法取 segments.length 下限,保证每片段至少 1 个素材 (#1600)
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 0s
CI/CD Pipeline / Check push changed paths (push) Successful in 11s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 3m10s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m3s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Successful in 1m34s
CI/CD Pipeline / Retag skipped Staging API Image (push) Successful in 1m39s
CI/CD Pipeline / Validate - Style (push) Successful in 5m29s
CI/CD Pipeline / Integration Tests (push) Successful in 5m43s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 2m13s
CI/CD Pipeline / Validate - Security (push) Successful in 8m22s
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 362h59m25s
CI/CD Pipeline / PR Build API Image (push) Failing after 363h2m41s
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 363h2m29s
CI/CD Pipeline / Frontend Lint (push) Failing after 363h2m41s
CI/CD Pipeline / Build Staging API Image (push) Failing after 363h2m29s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 363h2m41s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 363h2m43s
CI/CD Pipeline / PR Build Web Image (push) Failing after 363h36m57s
2026-09-01 12:22:30 +08:00
@@ -20,13 +20,14 @@ const SECONDS_PER_ASSET = 15
/**
* 根据模板 segments 计算所需素材数量上限。
* 取每个 segment 的 duration_min 之和作为目标视频总时长,
* 再按 15 秒/素材估算需要多少个素材;结果钳制到 [1, 200] 区间(后端 limit 上限 200)。
* 再按 15 秒/素材估算需要多少个素材,且保证不少于片段数(每个片段至少 1 个素材);
* 结果钳制到 [1, 200] 区间(后端 limit 上限 200)。
*/
function computeLimitFromSegments(segments?: TemplateSegment[]): number {
if (!segments || segments.length === 0) return DEFAULT_LIMIT
const totalSeconds = segments.reduce((sum, seg) => sum + (seg.duration_min || 0), 0)
if (totalSeconds <= 0) return DEFAULT_LIMIT
const limit = Math.ceil(totalSeconds / SECONDS_PER_ASSET)
const limit = Math.max(segments.length, Math.ceil(totalSeconds / SECONDS_PER_ASSET))
return Math.max(1, Math.min(limit, 200))
}