mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Fix for aspect ratio
This commit is contained in:
parent
541f440853
commit
90c7d68d15
1 changed files with 5 additions and 2 deletions
|
@ -148,9 +148,12 @@ class API():
|
||||||
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')
|
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')
|
||||||
videotrack['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
|
videotrack['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
|
||||||
except:
|
except:
|
||||||
videotrack['aspectratio'] = round(float(videotrack['width'] / videotrack['height']), 6)
|
videotrack['aspectratio'] = 1.85
|
||||||
else:
|
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)
|
videotracks.append(videotrack)
|
||||||
|
|
||||||
elif "Audio" in type:
|
elif "Audio" in type:
|
||||||
|
|
Loading…
Reference in a new issue