From 20cf3930b2e603f829ae8ac709828fc854729266 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Fri, 22 Jun 2012 11:37:25 +0530 Subject: [PATCH] Covert unicode artist/album strings to utf-8 before urlencoding --- headphones/cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headphones/cache.py b/headphones/cache.py index 29564756..f227910e 100644 --- a/headphones/cache.py +++ b/headphones/cache.py @@ -194,8 +194,8 @@ class Cache(object): params = { "method": "album.getInfo", "api_key": lastfm_apikey, - "artist": dbartist['ArtistName'], - "album": dbartist['AlbumTitle'], + "artist": dbartist['ArtistName'].encode('utf-8'), + "album": dbartist['AlbumTitle'].encode('utf-8'), "format": "json" }