[tracker] libtracker-extract: Process only record-2 tags in libiptcdata
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-extract: Process only record-2 tags in libiptcdata
- Date: Mon, 11 Apr 2011 17:50:33 +0000 (UTC)
commit 282e97966de206a8d968e8fc75e08f97f0e6405e
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Apr 11 19:12:12 2011 +0200
libtracker-extract: Process only record-2 tags in libiptcdata
Fixes NB#244267
src/libtracker-extract/tracker-iptc.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-iptc.c b/src/libtracker-extract/tracker-iptc.c
index 16b95ec..c539090 100644
--- a/src/libtracker-extract/tracker-iptc.c
+++ b/src/libtracker-extract/tracker-iptc.c
@@ -86,6 +86,15 @@ foreach_dataset (IptcDataSet *dataset,
TrackerIptcData *data = user_data;
gchar mbuffer[1024];
+ /* The meaning of dataset->tag DEPENDS on the value of dataset->record.
+ * See iptc-tag.h for the relationship.
+ *
+ * Now, We only want record-2 tags, otherwise we'll end up mixing
+ * for example IPTC_TAG_CITY and IPTC_TAG_CHARACTER_SET, which BOTH
+ * have a value of 90. */
+ if (dataset->record != IPTC_RECORD_APP_2)
+ return;
+
switch (dataset->tag) {
case IPTC_TAG_KEYWORDS:
if (!data->keywords) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]