[tracker/tracker-0.6] Fixes NB#Bug 135485, Image:Date mismatch
- From: Mikael Ottela <mottela src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.6] Fixes NB#Bug 135485, Image:Date mismatch
- Date: Mon, 16 Nov 2009 11:20:29 +0000 (UTC)
commit 0a54fa9b16e209b9ee3c6a9758e901c058a2b74f
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Tue Oct 27 15:45:50 2009 +0200
Fixes NB#Bug 135485, Image:Date mismatch
Fixed priority and added XAP:ModifyDate to xmp extraction.
src/tracker-extract/tracker-xmp.c | 84 +++++++++++++++++++------------------
1 files changed, 43 insertions(+), 41 deletions(-)
---
diff --git a/src/tracker-extract/tracker-xmp.c b/src/tracker-extract/tracker-xmp.c
index 85af36c..f661d4b 100644
--- a/src/tracker-extract/tracker-xmp.c
+++ b/src/tracker-extract/tracker-xmp.c
@@ -332,6 +332,49 @@ tracker_xmp_iter_simple (GHashTable *metadata,
tracker_append_string_to_hash_table (metadata, "File:License", value, append, FALSE);
}
}
+ /* XAP (XMP)scheme */
+ else if (strcmp (schema, NS_XAP) == 0) {
+ if (strcmp (name, "Rating") == 0) {
+ tracker_append_string_to_hash_table (metadata, "Image:Rating", value, append, FALSE);
+ }
+ if (strcmp (name, "MetadataDate") == 0) {
+ tracker_append_string_to_hash_table (metadata, "Image:Date", value, append, TRUE);
+ }
+ if (strcmp (name, "ModifyDate") == 0) {
+ tracker_append_string_to_hash_table (metadata, "Image:Date", value, append, TRUE);
+ }
+ }
+ /* IPTC4XMP scheme */
+ else if (strcmp (schema, NS_IPTC4XMP) == 0) {
+ if (strcmp (name, "Location") == 0) {
+ tracker_append_string_to_hash_table (metadata, "Image:Location", value, append, FALSE);
+
+ /* Added to the valid keywords */
+ tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
+
+ }
+ if (strcmp (name, "Sublocation") == 0) {
+ tracker_append_string_to_hash_table (metadata, "Image:Sublocation", value, append, FALSE);
+
+ /* Added to the valid keywords */
+ tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
+ }
+ }
+ /* Photoshop scheme */
+ else if (strcmp (schema, NS_PHOTOSHOP) == 0) {
+ if (strcmp (name, "City") == 0) {
+ tracker_append_string_to_hash_table (metadata, "Image:City", value, append, FALSE);
+
+ /* Added to the valid keywords */
+ tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
+ }
+ else if (strcmp (name, "Country") == 0) {
+ tracker_append_string_to_hash_table (metadata, "Image:Country", value, append, FALSE);
+
+ /* Added to the valid keywords */
+ tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
+ }
+ }
/* Exif basic scheme */
else if (strcmp (schema, NS_EXIF) == 0) {
if (strcmp (name, "Title") == 0) {
@@ -399,47 +442,6 @@ tracker_xmp_iter_simple (GHashTable *metadata,
tracker_append_string_to_hash_table (metadata, "File:Copyright", value, append, FALSE);
}
}
- /* XAP (XMP)scheme */
- else if (strcmp (schema, NS_XAP) == 0) {
- if (strcmp (name, "Rating") == 0) {
- tracker_append_string_to_hash_table (metadata, "Image:Rating", value, append, FALSE);
- }
- if (strcmp (name, "MetadataDate") == 0) {
- tracker_append_string_to_hash_table (metadata, "Image:Date", value, append, FALSE);
- }
- }
- /* IPTC4XMP scheme */
- else if (strcmp (schema, NS_IPTC4XMP) == 0) {
- if (strcmp (name, "Location") == 0) {
- tracker_append_string_to_hash_table (metadata, "Image:Location", value, append, FALSE);
-
- /* Added to the valid keywords */
- tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
-
- }
- if (strcmp (name, "Sublocation") == 0) {
- tracker_append_string_to_hash_table (metadata, "Image:Sublocation", value, append, FALSE);
-
- /* Added to the valid keywords */
- tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
- }
- }
- /* Photoshop scheme */
- else if (strcmp (schema, NS_PHOTOSHOP) == 0) {
- if (strcmp (name, "City") == 0) {
- tracker_append_string_to_hash_table (metadata, "Image:City", value, append, FALSE);
-
- /* Added to the valid keywords */
- tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
- }
- else if (strcmp (name, "Country") == 0) {
- tracker_append_string_to_hash_table (metadata, "Image:Country", value, append, FALSE);
-
- /* Added to the valid keywords */
- tracker_append_string_to_hash_table (metadata, "Image:Keywords", value, TRUE, FALSE);
- }
- }
-
g_free (name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]