Skip to content

Commit 6f789e3

Browse files
committed
Plexamp workaround
1 parent 9c50225 commit 6f789e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plexapi/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def query(self, path, method=None, headers=None, timeout=None, **kwargs):
165165
log.warning('BadRequest (%s) %s %s; %s' % (response.status_code, codename, response.url, errtext))
166166
raise BadRequest('(%s) %s; %s %s' % (response.status_code, codename, response.url, errtext))
167167
data = response.text.encode('utf8')
168+
if data == b'OK': # Workaround for misbehaving clients such as Plexamp
169+
data = ''
168170
return ElementTree.fromstring(data) if data.strip() else None
169171

170172
def sendCommand(self, command, proxy=None, **params):

0 commit comments

Comments
 (0)