From ef927d6b3b1b4bc941125d71c1c6fb85df04839c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 8 Aug 2015 03:57:04 -0500 Subject: [PATCH] Metadata aspect ratio Take it into consideration --- resources/lib/API.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(':')