Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cgwire/zou/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Playlists API enables creation and management of review playlists - curated collections of shots, sequences, episodes, or assets with their preview files. Playlists are essential for client reviews, director feedback sessions, and team screenings.Key Concepts
Playlist Structure
A playlist is a collection of entities (shots/assets) with associated preview files:Entity Types
Playlists support multiple entity types:- Shots: Individual shots with sequence/episode hierarchy
- Sequences: Full sequences with episode context
- Episodes: Complete episodes
- Assets: Characters, props, environments by asset type
for_entity field specifies the entity type (defaults to “shot”).
Preview File Integration
Each playlist entry can specify apreview_file_id:
- Links to specific preview file revision
- Includes file metadata: extension, dimensions, duration, status
- Retrieves all available previews grouped by task type
- Supports fallback to other task types if specified task has no preview
Scoping and Filtering
Project Scope: All playlists belong to a project. Episode Scope:- Specific episode:
episode_idset - Main pack:
episode_idis null,is_for_allis false - All assets:
episode_idis null,is_for_allis true
task_type_id (e.g., Animation, Lighting, Compositing).
Client Visibility:
Set for_client: true to mark playlist for client review.
Playlist Building
Build Jobs
Playlists can be compiled into downloadable formats: Movie Build (MP4):- Concatenates all preview movies into single MP4 file
- Supports full quality or web-optimized encoding
- Asynchronous job queue processing
- Email notification when build completes
- Packages all preview files (including sub-revisions) into ZIP
- Preserves original file names and formats
- Immediate download (no build job)
Build Process
- Start Build Job: Creates
BuildJobwith status “running” - Processing:
- Retrieves all preview files from file store
- Concatenates movies using FFmpeg (demuxer or filter mode)
- Stores result in file store
- Completion: Updates job status to “succeeded” or “failed”
- Notification: Sends email with download link
Encoding Parameters
Movie builds use project-level settings:- Width/Height: From
preview_files_service.get_preview_file_dimensions() - FPS: From
preview_files_service.get_preview_file_fps() - Full Quality: Optional parameter for high-quality builds
Remote Job Processing
For distributed systems:- Configurable via
ENABLE_JOB_QUEUE_REMOTE - Requires cloud storage backend (S3, Swift)
- Dispatches to Nomad job queue
- Compresses preview IDs for network transfer
Preview File Management
Retrieval and Revision Grouping
The service provides sophisticated preview file handling: Multi-revision Support: Previews with the same revision number are grouped together:- Task type priority (descending)
- Task type name
- Revision number (descending)
- Preview position
- Creation date
Entity Preview Structure
When retrieving playlist with previews:Temporary Playlists
Generate playlists on-the-fly from task IDs: Use Cases:- Quick review of selected tasks
- Ad-hoc screening without persisting playlist
- Synchronization and preview generation
- Automatically determines entity type from tasks
- Selects appropriate preview files by task type
- Falls back to linked task types if no preview available
- Optional sorting by episode/sequence/asset type
Playlist Operations
Adding Entities
Atomically add entities to playlists:- Uses Redis distributed lock for concurrency safety
- Prevents duplicate entries
- Falls back to database locking if Redis unavailable
- Emits
playlist:add_entityevent
Querying Playlists
Pagination:- Page size: 20 playlists per page
- Configurable sort order (default:
updated_at)
- By project
- By episode (including “main” and “all” special values)
- By task type
- Client visibility (
for_clientflag)
Client Notifications
Notify clients when playlists are ready:- Creates notifications for client users
- Filters by studio/department if specified
- Sends to all project team members with client role
File Storage
Storage Backends
Local Storage:- Files stored in
config.TMP_DIR - Direct file path access
- Files cached locally in
TMP_DIR - Retrieved on-demand from cloud backend
- Cached for subsequent requests
File Naming
Movie Builds:Permissions
Viewing Playlists
- Project access required
- Vendors blocked from playlist access
- Client users see only
for_clientplaylists
Managing Playlists
- Creating/editing: Manager project access
- Adding entities: Manager project access
- Building movies: Manager project access
- Deleting build jobs: Playlist access
Downloading
- ZIP/Movie downloads: Supervisor project access + playlist access
- Build job status: Standard playlist access
Events
Playlist operations emit events:playlist:add_entity- Entity added to playlistplaylist:delete- Playlist removedbuild-job:new- Build job startedbuild-job:update- Build job completed/failedbuild-job:delete- Build job removed
Best Practices
- Use task type filtering: Filter playlists by department for focused reviews
- Set for_client flag: Clearly mark client-facing playlists
- Organize by episode: Use episode scoping for TV show projects
- Monitor build jobs: Check job status before attempting download
- Clean up old builds: Remove completed build jobs to save storage
- Use temp playlists: For quick reviews, use temporary playlists instead of persisting
- Enable job queue: Use async processing for large playlists to avoid timeouts
- Notify clients: Use notification API when playlist is ready for review
Related Endpoints
See the Comments & Playlists Endpoints for full API reference.Service Functions
Key functions inplaylists_service.py:
all_playlists_for_project()- Paginated playlist listget_playlist_with_preview_file_revisions()- Full playlist with preview dataadd_entity_to_playlist()- Atomically add entity with lockingbuild_playlist_movie_file()- Concatenate previews into MP4build_playlist_zip_file()- Package previews into ZIPgenerate_temp_playlist()- Create temporary playlist from task IDsstart_build_job()/end_build_job()- Manage build lifecycleget_preview_files_for_entity()- Retrieve all previews for entityset_preview_files_for_entities()- Augment entities with preview data