1.9 KiB
1.9 KiB
Bulk Operations
User Perspective
Bulk operations allow users to apply a metadata change to many videos at once — without pushing to YouTube individually. Changes go through a preview → confirm flow.
Supported Bulk Actions
- Set Privacy Status — change privacy on all/selected videos
- Assign Template — apply a template to multiple videos
- Add Tags — append tags without replacing existing ones
- Remove Tags — remove specific tags from videos
- Search & Replace in Title — find and replace text in video titles
Push Pending Bulk Sync
The "Push Pending" feature batch-syncs all videos with pending changes to YouTube. Accessible via the Push Pending tab. Users preview field-level diffs before confirming.
Rollback
Completed bulk jobs can be rolled back from the Bulk Jobs page (/bulk-jobs). Rollback restores the beforeSnapshot values for each affected video.
Bulk Job Lifecycle
PENDING → DRY_RUN → CONFIRMED → RUNNING → DONE (or FAILED / ROLLED_BACK)
Developer Perspective
Backend
- Module:
backend/src/modules/bulk-jobs/ - Endpoints:
GET /bulk-jobs,GET /bulk-jobs/:id,POST /bulk-jobs/:id/rollback,GET /bulk-jobs/push-pending/preview,POST /bulk-jobs/push-pending - Header bulk change: The Header component's "Bulk Change" modal calls
POST /bulk-jobs/preview(viabulkPreview()in api.ts) andPOST /bulk-jobs/apply
Job Processing
The bulk-metadata.processor.ts processor:
- Loads
BulkJobwith allBulkJobItemrecords - For each item: saves
beforeSnapshot, applies change, savesafterSnapshot - Updates
successCount/errorCounton job - On completion: sets
status = DONEandcompletedAt
Data Model
BulkJob— one per operation. Hastype,filterSnapshot,rollbackDataBulkJobItem— one per video. HasbeforeSnapshot,afterSnapshot,status
Related
- 11 - Bulk Jobs API
- 01 - Video Management