Fix for aspect ratio

Comparing to Kodi, seems to give the same results now.
This commit is contained in:
angelblue05 2015-07-27 06:02:10 -05:00
parent 929786302c
commit cd618131e7

View file

@ -135,10 +135,10 @@ class API():
videotrack['Video3DFormat'] = item.get('Video3DFormat')
if len(videotrack['aspectratio']) >= 3:
try:
aspectwidth, aspectheight = aspectratio.split(':')
videotrack['aspectfloat'] = float(aspectwidth) / float(aspectheight)
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')
videotrack['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
except:
videotrack['aspectfloat'] = 1.85
videotrack['aspectratio'] = 1.85
videotracks.append(videotrack)
elif "Audio" in type: