forked from 0x2620/pandora
only use file metadata if there are files
This commit is contained in:
parent
65927d8ef1
commit
9025df0bf2
1 changed files with 11 additions and 10 deletions
|
@ -551,6 +551,7 @@ class Item(models.Model):
|
|||
s.risk = 0 #FIXME
|
||||
# data from related files
|
||||
videos = self.main_videos()
|
||||
if len(videos) > 0:
|
||||
s.duration = sum([v.duration for v in videos])
|
||||
s.resolution = videos[0].width * videos[0].height
|
||||
s.aspectratio = int(1000 * utils.parse_decimal(v.display_aspect_ratio))
|
||||
|
|
Loading…
Reference in a new issue