fix unicode error in urlencode

This commit is contained in:
marcelveldt 2016-01-18 20:56:10 +01:00
parent dbc91330ce
commit 11cf78de36

View file

@ -55,10 +55,11 @@ class Artwork():
return text return text
def single_urlencode(self, text): def single_urlencode(self, text):
text = urllib.urlencode({'blahblahblah':text})
text = urllib.urlencode({'blahblahblah':text.encode("utf-8")}) #urlencode needs a utf- string
text = text[13:] text = text[13:]
return text return text.decode("utf-8") #return the result again as unicode
def setKodiWebServerDetails(self): def setKodiWebServerDetails(self):
# Get the Kodi webserver details - used to set the texture cache # Get the Kodi webserver details - used to set the texture cache