From 1660a29e68561644134985c61408aa791191fcfc Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 8 Aug 2015 10:11:41 -0500 Subject: [PATCH] Improve network quality logging --- resources/lib/PlayUtils.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/lib/PlayUtils.py b/resources/lib/PlayUtils.py index 46c86888..985bbf2a 100644 --- a/resources/lib/PlayUtils.py +++ b/resources/lib/PlayUtils.py @@ -227,13 +227,14 @@ class PlayUtils(): try: mediaSources = result[u'MediaSources'] sourceBitRate = int(mediaSources[0][u'Bitrate']) - self.logMsg("The video quality selected is: %s, the video bitrate required to direct stream is: %s." % (settingsVideoBitRate, sourceBitRate), 1) - if settingsVideoBitRate > sourceBitRate: - return True - else: - return False except: - return True + self.logMsg("Bitrate value is missing.") + else: + self.logMsg("The video quality selected is: %s, the video bitrate required to direct stream is: %s." % (settingsVideoBitRate, sourceBitRate), 1) + if settingsVideoBitRate < sourceBitRate: + return False + + return True def getVideoBitRate(self): # get the addon video quality