[tracker] libtracker-common: Use space if the artist name is not known



commit 12656e475b2d6b21d2d0dadc76a681ecec507eb2
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Mon Aug 12 20:12:31 2013 +0800

    libtracker-common: Use space if the artist name is not known
    
    This is to follow the following spec:
    https://wiki.gnome.org/MediaArtStorageSpec#Identifiers
    
    Space will be the fallback if the artist name is unknown.
    
    Fixes GB#705834

 src/libtracker-common/tracker-media-art.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/libtracker-common/tracker-media-art.c b/src/libtracker-common/tracker-media-art.c
index b5dfa5c..5601478 100644
--- a/src/libtracker-common/tracker-media-art.c
+++ b/src/libtracker-common/tracker-media-art.c
@@ -272,15 +272,10 @@ tracker_media_art_get_path (const gchar  *artist,
                g_mkdir_with_parents (dir, 0770);
        }
 
-       if (artist) {
-               a = artist_checksum;
-               b = title ? title_checksum : space_checksum;
-       } else {
-               a = title_checksum;
-               b = space_checksum;
-       }
-
-       art_filename = g_strdup_printf ("%s-%s-%s.jpeg", prefix ? prefix : "album", a, b);
+       art_filename = g_strdup_printf ("%s-%s-%s.jpeg",
+                                       prefix ? prefix : "album",
+                                       artist ? artist_checksum : space_checksum,
+                                       title ? title_checksum : space_checksum);
 
        if (artist) {
                g_free (artist_checksum);


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