--- CoverArtDatabase.py.orig	2008-05-12 22:25:05.000000000 +0200
+++ CoverArtDatabase.py	2008-05-15 13:07:39.000000000 +0200
@@ -31,7 +31,12 @@
 
 ART_SEARCHES_LOCAL = [LocalCoverArtSearch]
 ART_SEARCHES_REMOTE = [PodcastCoverArtSearch, AmazonCoverArtSearch]
-ART_FOLDER = '~/.gnome2/rhythmbox/covers'
+OLD_ART_FOLDER = '~/.gnome2/rhythmbox/covers'
+# complicated way of saying ~/.cache/rhythmbox/covers
+ART_FOLDER = os.path.join(os.environ.get('XDG_CACHE_HOME',
+		os.path.join(os.environ.get('XDG_HOME_DIR',
+				os.environ.get('HOME','~')),
+				'.cache')), 'rhythmbox/covers')
 ART_CACHE_EXTENSION_JPG = 'jpg'
 ART_CACHE_EXTENSION_PNG = 'png'
 ART_CACHE_FORMAT_JPG = 'jpeg'
@@ -85,8 +90,14 @@
 		artist = db.entry_get (entry, rhythmdb.PROP_ARTIST)
 		album = db.entry_get (entry, rhythmdb.PROP_ALBUM)
 		art_folder = os.path.expanduser (ART_FOLDER)
+		old_art_folder = os.path.expanduser (OLD_ART_FOLDER)
+		if not os.path.exists (art_folder) and os.path.exists (old_art_folder):
+			parent = os.path.dirname(os.path.abspath(art_folder))
+			if not os.path.exists (parent):
+				os.makedirs (parent)
+			os.rename (old_art_folder, art_folder)
 		if not os.path.exists (art_folder):
-			os.mkdir (art_folder)
+			os.makedirs (art_folder)
 
 		# FIXME: the following block of code is messy and needs to be redone ASAP
 		return art_folder + '/%s - %s.%s' % (artist.replace ('/', '-'), album.replace ('/', '-'), extension)	
