mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Fix AR
This commit is contained in:
parent
8f207b820b
commit
a7a82f4ebb
1 changed files with 5 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue