Remove \r for Plex Companion replies

This commit is contained in:
tomkat83 2017-02-26 16:12:39 +01:00
parent 16acca16b9
commit e03af767ca
4 changed files with 7 additions and 7 deletions

View file

@ -57,7 +57,7 @@ def plex_type(xbmc_type):
def getXMLHeader():
return '<?xml version="1.0" encoding="utf-8" ?>\r\n'
return '<?xml version="1.0" encoding="utf-8" ?>\n'
def getOKMsg():

View file

@ -101,10 +101,10 @@ class MyHandler(BaseHTTPRequestHandler):
params.get('commandID', False))
if request_path == "version":
self.response(
"PlexKodiConnect Plex Companion: Running\r\nVersion: %s"
"PlexKodiConnect Plex Companion: Running\nVersion: %s"
% settings['version'])
elif request_path == "verify":
self.response("XBMC JSON connection test:\r\n" +
self.response("XBMC JSON connection test:\n" +
js.jsonrpc("ping"))
elif "resources" == request_path:
resp = ('%s'

View file

@ -71,7 +71,7 @@ class SubscriptionManager:
msg += self.getTimelineXML(self.js.getAudioPlayerId(players), plex_audio())
msg += self.getTimelineXML(self.js.getPhotoPlayerId(players), plex_photo())
msg += self.getTimelineXML(self.js.getVideoPlayerId(players), plex_video())
msg += "\r\n</MediaContainer>"
msg += "\n</MediaContainer>"
return msg
def getTimelineXML(self, playerid, ptype):
@ -84,7 +84,7 @@ class SubscriptionManager:
else:
state = "stopped"
time = 0
ret = "\r\n"+' <Timeline state="%s" time="%s" type="%s"' % (state, time, ptype)
ret = "\n"+' <Timeline state="%s" time="%s" type="%s"' % (state, time, ptype)
if playerid is None:
ret += ' seekRange="0-0"'
ret += ' />'

View file

@ -485,7 +485,7 @@ class WebSocket(object):
headers.append("")
headers.append("")
header_str = "\r\n".join(headers)
header_str = "\n".join(headers)
self._send(header_str)
if traceEnabled:
log.debug("--- request header ---")
@ -530,7 +530,7 @@ class WebSocket(object):
while True:
line = self._recv_line()
if line == "\r\n":
if line == "\n":
break
line = line.strip()
if traceEnabled: