1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed encoding for proxy scrobbling

This commit is contained in:
Krateng 2019-06-24 17:23:27 +02:00
parent 63c2214913
commit 305999cc14

View File

@ -151,7 +151,7 @@ def lfmbuild(parameters):
m.update(utf("".join(str(k) + str(parameters[k]) for k in keys)))
m.update(utf(get_settings("LASTFM_API_SECRET")))
sig = m.hexdigest()
return "&".join(str(k) + "=" + str(parameters[k]) for k in parameters) + "&api_sig=" + sig
return urllib.parse.urlencode(parameters) + "&api_sig=" + sig
def utf(st):
return st.encode(encoding="UTF-8")