? plugins/artdisplay/artdisplay/Makefile.in
Index: plugins/artdisplay/artdisplay/AmazonCoverArtSearch.py
===================================================================
RCS file: /cvs/gnome/rhythmbox/plugins/artdisplay/artdisplay/AmazonCoverArtSearch.py,v
retrieving revision 1.1
diff -u -r1.1 AmazonCoverArtSearch.py
--- plugins/artdisplay/artdisplay/AmazonCoverArtSearch.py	9 May 2006 12:32:19 -0000	1.1
+++ plugins/artdisplay/artdisplay/AmazonCoverArtSearch.py	11 May 2006 12:13:34 -0000
@@ -216,38 +216,42 @@
 		# Default to "no match", our results must match our criteria
 		best_match = None
 
-		if self.search_album!="Unknown":
-			album_check = self.__tidy_up_string(self.search_album)
-			for item in search_results:
-				# Check for album name in ProductName
-				product_name = self.__tidy_up_string(item.ProductName)
-				if product_name == album_check:
-					# Found exact album, can not get better than that
-					best_match = item
-					break
-				# If we already found a best_match, just keep checking for exact one
-				elif (best_match is None) and (product_name.find (album_check) != -1):
-					best_match = item
-
-		# If we still have no definite hit, use first result where artist matches
-		if (self.search_artist!="Unknown"):
-			artist_check = self.__tidy_up_string(self.search_artist)
-			if best_match is None:
-				# Check if artist appears in the Artists list
-				hit = False
+		try:
+			if self.search_album!="Unknown":
+				album_check = self.__tidy_up_string(self.search_album)
 				for item in search_results:
-					if type(item.Artists.Artist) <> type([]):
-						artists = [item.Artists.Artist]
-					else:
-						artists = item.Artists.Artist
+					# Check for album name in ProductName
+					product_name = self.__tidy_up_string(item.ProductName)
+					if product_name == album_check:
+						# Found exact album, can not get better than that
+						best_match = item
+						break
+					# If we already found a best_match, just keep checking for exact one
+					elif (best_match is None) and (product_name.find (album_check) != -1):
+						best_match = item
+
+			# If we still have no definite hit, use first result where artist matches
+			if (self.search_artist!="Unknown"):
+				artist_check = self.__tidy_up_string(self.search_artist)
+				if best_match is None:
+					# Check if artist appears in the Artists list
+					hit = False
+					for item in search_results:
+						if type(item.Artists.Artist) <> type([]):
+							artists = [item.Artists.Artist]
+						else:
+							artists = item.Artists.Artist
 
-					for artist in artists:
-						artist = self.__tidy_up_string(artist)
-						if artist.find(artist_check) != -1:
-							best_match = item
-							hit = True						
+						for artist in artists:
+							artist = self.__tidy_up_string(artist)
+							if artist.find(artist_check) != -1:
+								best_match = item
+								hit = True						
+								break
+						if hit:
 							break
-					if hit:
-						break
- 
-		return best_match
+
+			return best_match
+
+		except TypeError:
+			return None
Index: plugins/artdisplay/artdisplay/CoverArtDatabase.py
===================================================================
RCS file: /cvs/gnome/rhythmbox/plugins/artdisplay/artdisplay/CoverArtDatabase.py,v
retrieving revision 1.1
diff -u -r1.1 CoverArtDatabase.py
--- plugins/artdisplay/artdisplay/CoverArtDatabase.py	9 May 2006 12:32:19 -0000	1.1
+++ plugins/artdisplay/artdisplay/CoverArtDatabase.py	11 May 2006 12:13:34 -0000
@@ -62,7 +62,8 @@
 			return
 
 		# replace quote characters
-		for char in ["\"", "'"]:
+		# don't replace single quote: could be important punctuation
+		for char in ["\""]:
 			st_artist = st_artist.replace (char, '')
 			st_album = st_album.replace (char, '')
 
@@ -89,6 +90,10 @@
 		# Get best match from results
 		best_match = search_engine.get_best_match (results)
 
+		if best_match == None:
+			callback (entry, None)
+			return
+
 		# Attempt to download image for best match
 		pic_url = str(best_match.ImageUrlLarge)
 		self.loader.get_url (pic_url, self.on_image_data_received, search_engine, "large", callback, best_match)
@@ -102,9 +107,10 @@
 			if image_version == "large":
 				# Fallback and try to load medium one
 				best_match = search_engine.get_best_match (best_match)
-				pic_url = str(best_match.ImageUrlMedium)
-				self.loader.get_url (pic_url, self.on_image_data_received, search_engine, "medium", callback)
-				return
+				if best_match:
+					pic_url = str(best_match.ImageUrlMedium)
+					self.loader.get_url (pic_url, self.on_image_data_received, search_engine, "medium", callback)
+					return
 
 			blist_location = self.build_art_cache_filename(search_engine.st_album, search_engine.st_artist, "rb-blist")
 			f = file (blist_location, 'w')
