Fix UnicodeEncodeError, fixes #8

This commit is contained in:
tomkat83 2016-04-26 19:19:52 +02:00
parent d557712896
commit 3855bb16ed

View file

@ -1237,7 +1237,11 @@ class API():
except: except:
res = None res = None
if res is not None: if res is not None:
res = unquote(res).decode('utf-8') try:
res = unquote(res).decode('utf-8')
except UnicodeEncodeError:
# Sometimes, unquote seems to return unicode, not string
res = unquote(res)
return res return res
def getTVShowPath(self): def getTVShowPath(self):