feat: add download_url field to generated video APIs #20

Merged
xiaoxia merged 88 commits from feature/video-download into develop 2026-06-26 21:13:18 +08:00
Owner

Summary

This PR adds download URL functionality to the generated videos API.

Changes

  1. Schema Update (apps/api/app/schemas/generated_video.py):

    • Added download_url: str | None = None field to GeneratedVideoResponse
  2. API Routes Update (apps/api/app/api/routes/generated_videos.py):

    • Modified _to_generated_video_response function to accept optional download_url parameter
    • Updated list_generated_videos endpoint to generate download URLs for each video
    • Updated get_generated_video endpoint to include download URL in response
    • Updated update_generated_video_review_status endpoint to include download URL in response
    • Kept existing get_generated_video_download_url endpoint for explicit download URL requests

API Response Examples

List Videos Response

{
  "items": [
    {
      "id": "...",
      "workspace_id": "...",
      "name": "...",
      "file_url": "...",
      "download_url": "https://...",  // New field
      ...
    }
  ]
}

Get Video Response

{
  "id": "...",
  "download_url": "https://...",  // New field
  ...
}

Technical Details

  • Uses existing OSSStorageService.get_download_url() to generate download URLs
  • Supports both OSS (Alibaba Cloud) and local file storage
  • Download URLs are signed with expiration time for OSS storage

Closes: MVP feature requirement for video download functionality

## Summary This PR adds download URL functionality to the generated videos API. ### Changes 1. **Schema Update** (`apps/api/app/schemas/generated_video.py`): - Added `download_url: str | None = None` field to `GeneratedVideoResponse` 2. **API Routes Update** (`apps/api/app/api/routes/generated_videos.py`): - Modified `_to_generated_video_response` function to accept optional `download_url` parameter - Updated `list_generated_videos` endpoint to generate download URLs for each video - Updated `get_generated_video` endpoint to include download URL in response - Updated `update_generated_video_review_status` endpoint to include download URL in response - Kept existing `get_generated_video_download_url` endpoint for explicit download URL requests ### API Response Examples #### List Videos Response ```json { "items": [ { "id": "...", "workspace_id": "...", "name": "...", "file_url": "...", "download_url": "https://...", // New field ... } ] } ``` #### Get Video Response ```json { "id": "...", "download_url": "https://...", // New field ... } ``` ### Technical Details - Uses existing `OSSStorageService.get_download_url()` to generate download URLs - Supports both OSS (Alibaba Cloud) and local file storage - Download URLs are signed with expiration time for OSS storage Closes: MVP feature requirement for video download functionality
xiaoxia added 86 commits 2026-06-26 20:07:48 +08:00
merge: release V21 UI and core E2E hardening
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 26s
Tests / test (push) Successful in 18s
Tests / lint (push) Successful in 10s
Deploy / Deploy Staging (push) Has been skipped
Deploy / Build Production Runtime Images (push) Successful in 9m52s
Deploy / Deploy Production (push) Successful in 24s
Deploy / Production Browser E2E (push) Failing after 58s
31c0f23297
Merge develop into main through protected Gitea PR flow.
fix(ci): pass production API base to E2E
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 23s
Tests / test (push) Successful in 17s
Tests / lint (push) Successful in 10s
Deploy / Deploy Staging (push) Has been skipped
Deploy / Build Production Runtime Images (push) Successful in 9m40s
Deploy / Deploy Production (push) Successful in 23s
Deploy / Production Browser E2E (push) Failing after 32s
b914f55b7d
Merge production E2E API base hotfix.
test(web): scope generation approval assertion
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 26s
Tests / test (push) Successful in 16s
Tests / lint (push) Successful in 11s
Deploy / Deploy Staging (push) Has been skipped
Deploy / Build Production Runtime Images (push) Successful in 9m43s
Deploy / Deploy Production (push) Successful in 23s
Deploy / Production Browser E2E (push) Failing after 36s
2f9a1a42f5
Merge production E2E assertion hotfix.
test(web): target generation approval pill
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 26s
Tests / test (push) Successful in 17s
Tests / lint (push) Successful in 10s
Deploy / Deploy Staging (push) Has been skipped
Deploy / Build Production Runtime Images (push) Successful in 10m16s
Deploy / Deploy Production (push) Successful in 23s
Deploy / Production Browser E2E (push) Successful in 36s
06857d0a0d
Merge generation approval pill hotfix.
Merge pull request 'feat(web): complete V21 UI redesign' (#6) from develop into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 24s
Tests / test (push) Successful in 15s
Tests / lint (push) Successful in 8s
Deploy / Deploy Staging (push) Has been skipped
Deploy / Build Production Runtime Images (push) Failing after 29s
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
a31145950f
fix(security): P0 - 日志过滤敏感参数(token/password/secret等)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 1m0s
Tests / test (pull_request) Failing after 1m0s
Tests / lint (pull_request) Failing after 1m0s
e58293a51f
feat(ui): V21 design system overhaul
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 1m0s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 1m0s
Tests / test (pull_request) Failing after 1m0s
Tests / lint (pull_request) Failing after 1m0s
cae16d547e
fix: resolve CI check failures - format code and add nosec comment
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 1m0s
Tests / lint (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 1m0s
950f63bb69
fix: resolve CI check failures - format code and add nosec comment
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
071f0e990e
fix: resolve CI check failures - format code and fix line length issues
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
3d29dc0c83
fix: resolve CI check failures - format code and fix line length issues
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 1m0s
a4f721528e
ci: enable auto-deploy for feature branches
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
a0f8540a09
Merge pull request 'ci: enable auto-deploy for feature branches' (#10) from ci/enable-feature-deploy into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Tests / test (push) Has been cancelled
Tests / lint (push) Has been cancelled
a717dd17c8
Merge pull request 'fix(security): P0 - JWT密钥强制环境变量 + 日志敏感信息过滤' (#8) from fix/security-p0-jwt-logging into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Tests / test (push) Has been cancelled
Tests / lint (push) Has been cancelled
f34f654a84
Merge pull request 'feat(ui): V21 design system overhaul' (#9) from feature/v21-design-system into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Tests / test (push) Has been cancelled
Tests / lint (push) Has been cancelled
53055afa43
fix(p1): resolve 4 P1 technical debt issues
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
7fa327aa27
- P1-1: CORS configuration security - use DEBUG mode to differentiate
  production vs development CORS settings
- P1-2: Implement token refresh logic in RefreshTokenUseCase
  - Add get_session_by_refresh_token to SessionStore
  - Verify session validity and expiry
  - Generate new access token on refresh
- P1-3: Fix database connection leak in worker ingest task
  - Add proper try-except-finally block
  - Ensure db.close() is always called
- P1-4: Implement real media metadata extraction
  - Use ffprobe for video metadata
  - Use Pillow for image metadata
  - Return empty dict on failure (no mock data)
Merge pull request 'fix(p1): 修复 4 个 P1 技术债务问题' (#11) from fix/p1-technical-debt into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 0s
Tests / test (push) Failing after 0s
Tests / lint (push) Failing after 0s
13113f50c5
chore: update .gitignore for temp files
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
55d2b25f08
Merge pull request 'chore: 清理仓库 - 删除过时文件和已合并分支' (#13) from chore/repo-cleanup into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 0s
Tests / lint (push) Failing after 0s
Tests / test (push) Failing after 1m0s
3c54dcbef4
P3-5: 添加 tests/integration/test_auth.py 认证集成测试
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 30s
b300f66630
fix(ci): remove container field to run on host directly
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
8575ee772f
Merge pull request 'fix: 移除 CI container 配置,直接在 host 运行' (#16) from fix/ci-remove-container into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 0s
Tests / lint (push) Failing after 0s
Tests / test (push) Failing after 1m0s
c393c38d89
Merge pull request 'chore: 修复 P2/P3 技术债务' (#15) from fix/p2p3-tech-debt-v2 into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 0s
CI/CD Pipeline / Frontend Lint (push) Failing after 0s
Tests / test (push) Failing after 0s
Tests / lint (push) Failing after 1m0s
f2fe27eda6
fix(deploy): use ubuntu-latest runner label
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 0s
Tests / test (pull_request) Failing after 0s
Tests / lint (pull_request) Failing after 0s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 16m40s
1ba3543fa0
Merge pull request 'fix: 部署workflow使用ubuntu-latest runner label' (#17) from fix/deploy-runner-label into main
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 0s
CI/CD Pipeline / Frontend Lint (push) Failing after 0s
Tests / test (push) Failing after 0s
Tests / lint (push) Failing after 0s
42c543917e
chore: trigger CI/Deploy pipeline test
Tests / test (push) Failing after 1s
Tests / lint (push) Failing after 1s
CI/CD Pipeline / Frontend Lint (push) Failing after 0s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 1m30s
dbf2092e89
feat: add download_url field to generated video APIs
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 5s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 1s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 0s
CI/CD Pipeline / Frontend Lint (push) Failing after 1m0s
4d9c201858
- Add download_url field to GeneratedVideoResponse schema
- Generate download URLs for list, detail and review APIs
- Keep existing download-url endpoint for explicit download URL requests
xiaoxia added 1 commit 2026-06-26 21:11:54 +08:00
chore: merge develop into feature/video-download
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Waiting to run
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
4a45e23302
xiaoxia added 1 commit 2026-06-26 21:13:13 +08:00
chore: merge develop into feature/video-download (fix conflict)
CI/CD Pipeline / Validate Code Quality And Tests (push) Waiting to run
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Waiting to run
55fad055d3
xiaoxia merged commit 5dbde7e176 into develop 2026-06-26 21:13:18 +08:00
Sign in to join this conversation.