if file has audio/video track flag as type
This commit is contained in:
parent
49356d2f7a
commit
65fc082b1b
1 changed files with 5 additions and 0 deletions
|
@ -181,6 +181,11 @@ class File(models.Model):
|
|||
for type in ox.movie.EXTENSIONS:
|
||||
if data['extension'] in ox.movie.EXTENSIONS[type]:
|
||||
data['type'] = type
|
||||
if data['type'] == 'unknown':
|
||||
if self.info.get('video'):
|
||||
data['type'] = 'video'
|
||||
elif self.info.get('audio'):
|
||||
data['type'] = 'audio'
|
||||
if 'part' in data and isinstance(data['part'], int):
|
||||
data['part'] = str(data['part'])
|
||||
return data
|
||||
|
|
Loading…
Reference in a new issue