make systems without imdb work
This commit is contained in:
parent
7686f7974f
commit
200741445f
10 changed files with 76 additions and 36 deletions
|
|
@ -77,7 +77,8 @@ class File(models.Model):
|
|||
for key in ('duration', 'size'):
|
||||
setattr(self, key, self.info.get(key, 0))
|
||||
|
||||
if 'video' in self.info and self.info['video']:
|
||||
if 'video' in self.info and self.info['video'] and \
|
||||
'width' in self.info['video'][0]:
|
||||
video = self.info['video'][0]
|
||||
self.video_codec = video['codec']
|
||||
self.width = video['width']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue