[tracker] tracker-extract: Multiple double spaces in albumart filename determining
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Multiple double spaces in albumart filename determining
- Date: Mon, 7 Feb 2011 15:27:49 +0000 (UTC)
commit dda6b5d25223bb3cc42be125ff23101b5305dfc8
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Feb 7 16:25:27 2011 +0100
tracker-extract: Multiple double spaces in albumart filename determining
Fixes NB#217610.
src/tracker-extract/tracker-albumart.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index fb84d0a..2fc5d62 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -176,11 +176,13 @@ albumart_strip_invalid_entities (const gchar *original)
str = g_strjoinv (convert_chars_delimiter, strv);
g_strfreev (strv);
- /* Now remove double spaces */
- strv = g_strsplit (str, " ", -1);
- g_free (str);
- str = g_strjoinv (" ", strv);
- g_strfreev (strv);
+ while (g_strrstr (str, " ") != NULL) {
+ /* Now remove double spaces */
+ strv = g_strsplit (str, " ", -1);
+ g_free (str);
+ str = g_strjoinv (" ", strv);
+ g_strfreev (strv);
+ }
/* Now strip leading/trailing white space */
g_strstrip (str);
@@ -251,6 +253,8 @@ albumart_get_path (const gchar *artist,
artist_down = g_utf8_strdown (artist_stripped, -1);
album_down = g_utf8_strdown (album_stripped, -1);
+ /* g_print ("[%s] [%s]\n", artist_down, album_down); */
+
g_free (artist_stripped);
g_free (album_stripped);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]