Improve code for video upload feature
Fix i18n for video status strings (broken in commit 4b53f4d) and remove
unnecessary complexity from a test case. This also removes the status
whitelist in the video upload configuration. Because status is included
in the CSV report, it is not necessary to filter the included videos by
status.
This commit is contained in:
@@ -14,23 +14,8 @@ class VideoUploadConfig(ConfigurationModel):
|
||||
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 Studio 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]
|
||||
|
||||
Reference in New Issue
Block a user