[tracker] libtracker-miner, tracker-extract: Use NULL and not " ", which gets stripped to ""



commit 907a800a563e7bde6dd5d17413ba533488ee4ee5
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Sep 15 10:48:41 2011 +0200

    libtracker-miner, tracker-extract: Use NULL and not " ", which gets stripped to ""
    
    Our internal API, tracker_albumart_get_path, strips " " into "". This meant that
    for forming the album media-art filename the md5 of "" was taken instead of of
    the single-space string " ". When we pass NULL it returns the correct filename.
    
    Fixes NB#282190.

 src/libtracker-miner/tracker-albumart.c |    2 +-
 src/tracker-extract/tracker-albumart.c  |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-albumart.c b/src/libtracker-miner/tracker-albumart.c
index 03e4717..bcef407 100644
--- a/src/libtracker-miner/tracker-albumart.c
+++ b/src/libtracker-miner/tracker-albumart.c
@@ -89,7 +89,7 @@ on_query_finished (GObject      *source_object,
 		g_hash_table_replace (table, target, target);
 
 		/* Also add the file to which the symlinks are made */
-		tracker_albumart_get_path (" ",
+		tracker_albumart_get_path (NULL,
 		                           album,
 		                           "album", NULL,
 		                           &album_path, NULL);
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index af07518..5fb3d38 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -399,7 +399,7 @@ albumart_heuristic (const gchar *artist,
 					}
 
 					if (!album_path) {
-						tracker_albumart_get_path (" ",
+						tracker_albumart_get_path (NULL,
 						                           album_stripped,
 						                           "album",
 						                           NULL,
@@ -509,7 +509,7 @@ albumart_heuristic (const gchar *artist,
 					}
 
 					if (!album_path) {
-						tracker_albumart_get_path (" ",
+						tracker_albumart_get_path (NULL,
 						                           album_stripped,
 						                           "album",
 						                           NULL,
@@ -572,7 +572,7 @@ albumart_set (const unsigned char *buffer,
 	} else {
 		gchar *album_path;
 
-		tracker_albumart_get_path (" ", album, "album", NULL, &album_path, NULL);
+		tracker_albumart_get_path (NULL, album, "album", NULL, &album_path, NULL);
 
 		if (!g_file_test (album_path, G_FILE_TEST_EXISTS)) {
 			retval = tracker_albumart_buffer_to_jpeg (buffer, len, mime, album_path);



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