fix for setPoster returning the new selected posters thumb path

setPoster's response.encoding will be None all others are str
This commit is contained in:
blacktwin 2020-03-13 21:47:56 -04:00
parent 47950201b0
commit c72cc24584

View file

@ -401,7 +401,7 @@ class PlexServer(PlexObject):
log.warning('BadRequest (%s) %s %s; %s' % (response.status_code, codename, response.url, errtext))
raise BadRequest('(%s) %s; %s %s' % (response.status_code, codename, response.url, errtext))
data = response.text.encode('utf8')
return ElementTree.fromstring(data) if data.strip() else None
return ElementTree.fromstring(data) if data.strip() and response.encoding else None
def search(self, query, mediatype=None, limit=None):
""" Returns a list of media items or filter categories from the resulting