diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 31803e3c..acddc93e 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -291,7 +291,8 @@ class PlexAPI(): answer = self.doUtils(url, authenticate=False, headerOptions=headerOptions, - verifySSL=verifySSL) + verifySSL=verifySSL, + dontSignout=True) if answer is False: self.logMsg("Could not connect to %s" % url, 0) count += 1 diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index 74ee0e82..2dd0be33 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -145,7 +145,8 @@ class DownloadUtils(): return r def downloadUrl(self, url, type="GET", postBody=None, parameters=None, - authenticate=True, headerOptions=None, verifySSL=True): + authenticate=True, headerOptions=None, verifySSL=True, + dontSignout=False): """ Override SSL check with verifySSL=False @@ -248,6 +249,9 @@ class DownloadUtils(): return True elif r.status_code == 401: + if dontSignout is True: + # Called when checking a connect - no need for rash action + return 401 r.encoding = 'utf-8' self.logMsg('HTTP error 401 from PMS. Message received:', -1) self.logMsg(r.text, -1)