[tracker/tracker-0.10-nb276745: 6/7] tracker-extract, png: Ignore images in certain directories



commit f9514c15b06ef2ffb218f349879ec26443018a4e
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Oct 18 12:22:39 2011 +0200

    tracker-extract, png: Ignore images in certain directories

 src/tracker-extract/tracker-extract-png.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index 262fadf..ae3c002 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -30,6 +30,9 @@
 #include <libtracker-common/tracker-date-time.h>
 #include <libtracker-extract/tracker-extract.h>
 
+#include "tracker-main.h"
+#include "tracker-config.h"
+
 #define RFC1123_DATE_FORMAT "%d %B %Y %H:%M:%S %z"
 #define CM_TO_INCH          0.393700787
 
@@ -708,7 +711,7 @@ guess_dlna_profile (gint          depth,
                     const gchar **dlna_profile,
                     const gchar **dlna_mimetype)
 {
-	gchar *profile = NULL;
+	const gchar *profile = NULL;
 
 	if (dlna_profile) {
 		*dlna_profile = NULL;
@@ -768,6 +771,13 @@ extract_png (const gchar          *uri,
 		return;
 	}
 
+	if (g_slist_find_custom (tracker_config_get_ignore_images_under (
+	                            tracker_main_get_config()),
+	                         filename, (GCompareFunc) strstr)) {
+		g_free (filename);
+		return;
+	}
+
 	f = tracker_file_open (filename);
 	g_free (filename);
 



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