Add URL download endpoint for Studio video uploads

The endpoint returns an Excel-dialect CSV file for download.
This commit is contained in:
Greg Price
2014-12-18 14:19:46 -05:00
committed by Nimisha Asthagiri
parent cc306843bc
commit 4e1925129e
8 changed files with 404 additions and 36 deletions

View File

@@ -0,0 +1,32 @@
"""
Models for contentstore
"""
from django.db.models.fields import TextField
from config_models.models import ConfigurationModel
class VideoEncodingDownloadConfig(ConfigurationModel):
"""Configuration for what to include in video encoding downloads"""
profile_whitelist = TextField(
blank=True,
help_text="A comma-separated list of names of profiles to include in video encoding downloads"
)
status_whitelist = TextField(
blank=True,
help_text="A comma-separated list of status values; only videos with these status values will be included in video encoding downloads"
)
@classmethod
def get_profile_whitelist(cls):
"""Get the list of profiles to include in the encoding download"""
return [profile for profile in cls.current().profile_whitelist.split(",") if profile]
@classmethod
def get_status_whitelist(cls):
"""
Get the list of status values to include files for in the encoding
download
"""
return [status for status in cls.current().status_whitelist.split(",") if status]