mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +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(':')
|
aspectwidth, aspectheight = aspectratio.split(':')
|
||||||
track['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
|
track['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
|
||||||
|
|
||||||
except ValueError:
|
except (ValueError, ZeroDivisionError):
|
||||||
width = track['width']
|
width = track.get('width')
|
||||||
height = track['height']
|
height = track.get('height')
|
||||||
|
|
||||||
if width and height:
|
if width and height:
|
||||||
track['aspectratio'] = round(float(width / height), 6)
|
track['aspectratio'] = round(float(width / height), 6)
|
||||||
|
else:
|
||||||
|
track['aspectratio'] = 1.85
|
||||||
|
|
||||||
videotracks.append(track)
|
videotracks.append(track)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue