[tracker/tracker-0.10-nb276745: 4/7] tracker-extract, icon: Ignore images in certain directories
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10-nb276745: 4/7] tracker-extract, icon: Ignore images in certain directories
- Date: Tue, 18 Oct 2011 13:21:25 +0000 (UTC)
commit f5ee362a7e4732853000dd702bcb6785f9a88200
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Oct 18 12:22:18 2011 +0200
tracker-extract, icon: Ignore images in certain directories
src/tracker-extract/tracker-extract-icon.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-icon.c b/src/tracker-extract/tracker-extract-icon.c
index 0a6185f..626637e 100644
--- a/src/tracker-extract/tracker-extract-icon.c
+++ b/src/tracker-extract/tracker-extract-icon.c
@@ -22,6 +22,9 @@
#include <libtracker-common/tracker-file-utils.h>
#include <libtracker-extract/tracker-extract.h>
+#include "tracker-main.h"
+#include "tracker-config.h"
+
static void extract_icon (const gchar *filename,
TrackerSparqlBuilder *preupdate,
TrackerSparqlBuilder *metadata);
@@ -140,6 +143,18 @@ extract_icon (const gchar *uri,
{
guint max_width;
guint max_height;
+ gchar *filename;
+
+ filename = g_filename_from_uri (uri, NULL, NULL);
+
+ if (g_slist_find_custom (tracker_config_get_ignore_images_under (
+ tracker_main_get_config()),
+ filename, (GCompareFunc) strstr)) {
+ g_free (filename);
+ return;
+ }
+
+ g_free (filename);
/* The Windows Icon file format may contain the same icon with different
* sizes inside, so there's no clear way of setting single width and
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]