From 3d5a3e9bfb4a40d3e2fd87d56a268ba7c3df5d60 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 8 Apr 2016 13:18:19 +0200 Subject: [PATCH] Don't declare connection when poking PMS --- resources/lib/PlexFunctions.py | 3 ++- resources/lib/downloadutils.py | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/lib/PlexFunctions.py b/resources/lib/PlexFunctions.py index 35dc794e..0a549981 100644 --- a/resources/lib/PlexFunctions.py +++ b/resources/lib/PlexFunctions.py @@ -421,7 +421,8 @@ def PMSHttpsEnabled(url): doUtils = downloadutils.DownloadUtils().downloadUrl res = doUtils('https://%s/identity' % url, authenticate=False, - verifySSL=False) + verifySSL=False, + dontSignout=True) try: res.attrib except: diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index 2dd0be33..fe2ea76c 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -200,10 +200,11 @@ class DownloadUtils(): # THE EXCEPTIONS except requests.exceptions.ConnectionError as e: # Connection error - self.logMsg("Server unreachable at: %s" % url, -1) - self.logMsg(e, 2) - # Make the addon aware of status - window('emby_online', value="false") + if dontSignout is False: + self.logMsg("Server unreachable at: %s" % url, -1) + self.logMsg(e, 2) + # Make the addon aware of status + window('emby_online', value="false") return False except requests.exceptions.ConnectTimeout as e: