[kupfer: 45/53] rhythmbox: Fix encoding issue with thumbnails



commit 8175104c3061e22612a3bb4dc69ade00ed78524d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 24 17:22:40 2011 +0100

    rhythmbox: Fix encoding issue with thumbnails

 kupfer/plugin/rhythmbox.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/rhythmbox.py b/kupfer/plugin/rhythmbox.py
index 67ecc7a..5625bd9 100644
--- a/kupfer/plugin/rhythmbox.py
+++ b/kupfer/plugin/rhythmbox.py
@@ -281,8 +281,9 @@ class AlbumLeaf (TrackCollection):
 	def _get_thumb_rhythmbox(self):
 		artist = self.object[0]["artist"]
 		album = unicode(self)
-		return config.get_cache_file(("rhythmbox", "covers",
-		                              "%s - %s.jpg" % (artist, album)))
+		bs_artist_album = \
+			" - ".join([us.encode("ascii", "ignore") for us in (artist, album)])
+		return config.get_cache_file(("rhythmbox", "covers", bs_artist_album))
 
 	def get_thumbnail(self, width, height):
 		if not hasattr(self, "cover_file"):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]