[rhythmbox] don't store embedded images if we don't have an artist name



commit bc09947d0ae9c6f89b245cb0b6fbd978a04a26cd
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Mar 17 16:39:04 2012 +1000

    don't store embedded images if we don't have an artist name

 shell/rb-shell-player.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/shell/rb-shell-player.c b/shell/rb-shell-player.c
index e37553e..d485c0e 100644
--- a/shell/rb-shell-player.c
+++ b/shell/rb-shell-player.c
@@ -3732,13 +3732,17 @@ player_image_cb (RBPlayer *player,
 	if (image == NULL)
 		return;
 
-	store = rb_ext_db_new ("album-art");
-
-	key = rb_ext_db_key_create_storage ("album", rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM));
 	artist = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM_ARTIST);
 	if (artist == NULL || artist[0] == '\0' || strcmp (artist, _("Unknown")) == 0) {
 		artist = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ARTIST);
+		if (artist == NULL || artist[0] == '\0' || strcmp (artist, _("Unknown")) == 0) {
+			return;
+		}
 	}
+
+	store = rb_ext_db_new ("album-art");
+
+	key = rb_ext_db_key_create_storage ("album", rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM));
 	rb_ext_db_key_add_field (key, "artist", artist);
 
 	g_value_init (&v, GDK_TYPE_PIXBUF);



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