This commit is contained in:
angelblue05 2015-12-24 18:02:31 -06:00
parent 8f207b820b
commit a7a82f4ebb

View file

@ -165,12 +165,14 @@ class API():
aspectwidth, aspectheight = aspectratio.split(':')
track['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
except ValueError:
width = track['width']
height = track['height']
except (ValueError, ZeroDivisionError):
width = track.get('width')
height = track.get('height')
if width and height:
track['aspectratio'] = round(float(width / height), 6)
else:
track['aspectratio'] = 1.85
videotracks.append(track)