Fix for aspect ratio

This commit is contained in:
angelblue05 2015-07-31 16:13:32 -05:00
parent 541f440853
commit 90c7d68d15

View file

@ -148,9 +148,12 @@ class API():
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')
videotrack['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
except:
videotrack['aspectratio'] = round(float(videotrack['width'] / videotrack['height']), 6)
videotrack['aspectratio'] = 1.85
else:
videotrack['aspectratio'] = round(float(videotrack['width'] / videotrack['height']), 6)
try:
videotrack['aspectratio'] = round(float(videotrack['width'] / videotrack['height']), 6)
except: # In the event the aspect ratio is missing and the width and height are missing as well.
videotrack['aspectratio'] = 1.85
videotracks.append(videotrack)
elif "Audio" in type: