audio only
This commit is contained in:
parent
5df4aea677
commit
d7e8d18e35
3 changed files with 21 additions and 4 deletions
|
|
@ -101,6 +101,9 @@ class File(models.Model):
|
|||
self.is_video = False
|
||||
else:
|
||||
self.is_video = False
|
||||
self.display_aspect_ratio = "4:3"
|
||||
self.width = '320'
|
||||
self.height = '240'
|
||||
if 'audio' in self.info and self.info['audio']:
|
||||
audio = self.info['audio'][0]
|
||||
self.audio_codec = audio['codec']
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ def update(request):
|
|||
response['data']['info'] = [f.file.oshash for f in files.filter(file__info='{}')]
|
||||
#needs some flag to find those that are actually used main is to generic
|
||||
response['data']['data'] = [f.file.oshash for f in files.filter(file__is_video=True, file__is_main=True)]
|
||||
response['data']['data'] += [f.file.oshash for f in files.filter(file__is_audio=True, file__is_main=True)]
|
||||
response['data']['file'] = [f.file.oshash for f in files.filter(file__is_subtitle=True)]
|
||||
|
||||
return render_to_json_response(response)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue