[tracker] Use NFKD normalization for album and artist in albumart filename forming



commit 6a56a802fdd00180810a8a377ff38ffa42c4bb4b
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Nov 14 14:38:38 2011 +0100

    Use NFKD normalization for album and artist in albumart filename forming
    
    Fixes NB#290814.

 src/libtracker-common/tracker-albumart.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-common/tracker-albumart.c b/src/libtracker-common/tracker-albumart.c
index 7974cdb..ff0f1ac 100644
--- a/src/libtracker-common/tracker-albumart.c
+++ b/src/libtracker-common/tracker-albumart.c
@@ -226,6 +226,7 @@ tracker_albumart_get_path (const gchar  *artist,
 	gchar *dir;
 	gchar *artist_down, *album_down;
 	gchar *artist_stripped, *album_stripped;
+	gchar *artist_norm, *album_norm;
 	gchar *artist_checksum, *album_checksum;
 
 	/* http://live.gnome.org/MediaArtStorageSpec */
@@ -254,11 +255,16 @@ tracker_albumart_get_path (const gchar  *artist,
 		album_stripped = tracker_albumart_strip_invalid_entities (album);
 	}
 
-	artist_down = g_utf8_strdown (artist_stripped, -1);
-	album_down = g_utf8_strdown (album_stripped, -1);
+	artist_norm = g_utf8_normalize (artist_stripped, -1, G_NORMALIZE_NFKD);
+	album_norm = g_utf8_normalize (album_stripped, -1, G_NORMALIZE_NFKD);
+
+	artist_down = g_utf8_strdown (artist_norm, -1);
+	album_down = g_utf8_strdown (album_norm, -1);
 
 	/* g_print ("[%s] [%s]\n", artist_down, album_down); */
 
+	g_free (artist_norm);
+	g_free (album_norm);
 	g_free (artist_stripped);
 	g_free (album_stripped);
 



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