Revert "Fix to Plex Companion response not conform to HTTP standards"
This reverts commit 531dba40bf
.
This commit is contained in:
parent
ea63801a2b
commit
5a4f4a9b71
2 changed files with 4 additions and 9 deletions
|
@ -185,12 +185,11 @@ class DownloadUtils():
|
|||
header = plx.getXArgsDeviceInfo(options=options)
|
||||
return header
|
||||
|
||||
def downloadUrl(self, url, postBody=None, type="GET", parameters=None, authenticate=True, headerOptions={}, timeout=None):
|
||||
def downloadUrl(self, url, postBody=None, type="GET", parameters=None, authenticate=True, headerOptions={}):
|
||||
|
||||
# self.logMsg("=== ENTER downloadUrl ===", 2)
|
||||
|
||||
if timeout is None:
|
||||
timeout = self.timeout
|
||||
timeout = self.timeout
|
||||
default_link = ""
|
||||
|
||||
try:
|
||||
|
@ -366,7 +365,7 @@ class DownloadUtils():
|
|||
|
||||
except requests.exceptions.ConnectTimeout as e:
|
||||
self.logMsg("Server timeout at: %s" % url, 0)
|
||||
# self.logMsg(e, 1)
|
||||
self.logMsg(e, 1)
|
||||
|
||||
except requests.exceptions.HTTPError as e:
|
||||
|
||||
|
|
|
@ -243,14 +243,10 @@ class Subscriber:
|
|||
url = self.protocol + '://' + self.host + ':' + self.port \
|
||||
+ "/:/timeline"
|
||||
|
||||
# Choose an extremely low timeout due to Plex players response not
|
||||
# being conform to HTTP standards (content length is wrong). Otherwise,
|
||||
# This thread gets blocked for a couple of seconds
|
||||
response = self.download.downloadUrl(
|
||||
url,
|
||||
postBody=msg,
|
||||
type="POSTXML",
|
||||
timeout=0.001)
|
||||
type="POSTXML")
|
||||
# if not requests.post(self.host, self.port, "/:/timeline", msg, getPlexHeaders(), self.protocol):
|
||||
# subMgr.removeSubscriber(self.uuid)
|
||||
if response in [False, None, 401]:
|
||||
|
|
Loading…
Reference in a new issue