use first format by default
This commit is contained in:
parent
017d9be45a
commit
0da9097a6a
2 changed files with 4 additions and 2 deletions
|
|
@ -553,7 +553,7 @@ class File(models.Model):
|
|||
|
||||
def process_stream(self):
|
||||
'''
|
||||
extract derivatives from webm upload
|
||||
extract derivatives from stream upload
|
||||
'''
|
||||
from . import tasks
|
||||
return tasks.process_stream.delay(self.id)
|
||||
|
|
|
|||
|
|
@ -1004,7 +1004,9 @@ def download_source(request, id, part=None):
|
|||
response['Content-Disposition'] = "attachment; filename*=UTF-8''%s" % quote(filename.encode('utf-8'))
|
||||
return response
|
||||
|
||||
def download(request, id, resolution=None, format='webm', part=None):
|
||||
def download(request, id, resolution=None, format=None, part=None):
|
||||
if format is None:
|
||||
format = settings.CONFIG['video']['formats'][0]
|
||||
item = get_object_or_404(models.Item, public_id=id)
|
||||
if not resolution or int(resolution) not in settings.CONFIG['video']['resolutions']:
|
||||
resolution = max(settings.CONFIG['video']['resolutions'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue