Fix Plex Web's Plex Companion connection terminating suddenly
This commit is contained in:
parent
f3754fa2e3
commit
aa14e8259f
1 changed files with 3 additions and 4 deletions
|
@ -181,9 +181,9 @@ class MyHandler(BaseHTTPRequestHandler):
|
||||||
'Content-Type': 'text/xml;charset=utf-8'
|
'Content-Type': 'text/xml;charset=utf-8'
|
||||||
}.update(headers))
|
}.update(headers))
|
||||||
else:
|
else:
|
||||||
# Fail connection with HTTP 500 error - has been open too long
|
# We're not playing anything yet, just reply with a 200
|
||||||
self.response(
|
self.response(
|
||||||
'Need to close this connection on the PKC side',
|
msg,
|
||||||
{
|
{
|
||||||
'X-Plex-Client-Identifier': v.PKC_MACHINE_IDENTIFIER,
|
'X-Plex-Client-Identifier': v.PKC_MACHINE_IDENTIFIER,
|
||||||
'X-Plex-Protocol': '1.0',
|
'X-Plex-Protocol': '1.0',
|
||||||
|
@ -192,8 +192,7 @@ class MyHandler(BaseHTTPRequestHandler):
|
||||||
'Access-Control-Expose-Headers':
|
'Access-Control-Expose-Headers':
|
||||||
'X-Plex-Client-Identifier',
|
'X-Plex-Client-Identifier',
|
||||||
'Content-Type': 'text/xml;charset=utf-8'
|
'Content-Type': 'text/xml;charset=utf-8'
|
||||||
}.update(headers),
|
}.update(headers))
|
||||||
code=500)
|
|
||||||
elif "/subscribe" in request_path:
|
elif "/subscribe" in request_path:
|
||||||
headers['Content-Type'] = 'text/xml;charset=utf-8'
|
headers['Content-Type'] = 'text/xml;charset=utf-8'
|
||||||
headers = clientinfo.getXArgsDeviceInfo(options=headers,
|
headers = clientinfo.getXArgsDeviceInfo(options=headers,
|
||||||
|
|
Loading…
Reference in a new issue