diff --git a/resources/lib/API.py b/resources/lib/API.py index 25d42f7c..af6e5488 100644 --- a/resources/lib/API.py +++ b/resources/lib/API.py @@ -142,7 +142,10 @@ class API(): videotrack['height'] = mediaStream.get('Height') videotrack['width'] = mediaStream.get('Width') videotrack['Video3DFormat'] = item.get('Video3DFormat') - videotrack['aspectratio'] = mediaStream.get('AspectRatio', "0") + try:# Metadata aspect ratio + videotrack['aspectratio'] = item['AspectRatio'] + except: # File aspect ratio + videotrack['aspectratio'] = mediaStream.get('AspectRatio', "0") if len(videotrack['aspectratio']) >= 3: try: aspectwidth, aspectheight = videotrack['aspectratio'].split(':')