[tracker/tracker-0.10] tracker-writeback, xmp: Writeback the GPS direction property



commit 5de4625e791fc9819d0ee51505d7c34a3aac5add
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Jun 10 12:13:46 2011 +0200

    tracker-writeback, xmp: Writeback the GPS direction property

 data/ontologies/38-nmm.ontology               |    3 ++-
 src/tracker-writeback/tracker-writeback-xmp.c |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/data/ontologies/38-nmm.ontology b/data/ontologies/38-nmm.ontology
index a098f74..eacaefe 100644
--- a/data/ontologies/38-nmm.ontology
+++ b/data/ontologies/38-nmm.ontology
@@ -13,7 +13,7 @@
 
 nmm: a tracker:Namespace, tracker:Ontology ;
 	tracker:prefix "nmm" ;
-	nao:lastModified "2011-06-10T01:12:00Z" .
+	nao:lastModified "2011-06-10T01:12:08Z" .
 
 nmm:MusicPiece a rdfs:Class ;
 	rdfs:label "Music" ;
@@ -436,6 +436,7 @@ nmm:direction ;
 	rdfs:comment "The direction the image is taken (angle wrt true north)" ;
 	nrl:maxCardinality 1 ;
 	rdfs:domain nmm:Photo ;
+	tracker:writeback true ;
 	rdfs:range xsd:double .
 
 # Radio (IE part)
diff --git a/src/tracker-writeback/tracker-writeback-xmp.c b/src/tracker-writeback/tracker-writeback-xmp.c
index cab15f9..a8dfd98 100644
--- a/src/tracker-writeback/tracker-writeback-xmp.c
+++ b/src/tracker-writeback/tracker-writeback-xmp.c
@@ -386,6 +386,11 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile    *wbf,
 			g_free (work_on);
 		}
 #endif /* SET_TYPICAL_CAMERA_FIELDS */
+
+		if (g_strcmp0 (row[2], TRACKER_NMM_PREFIX "direction") == 0) {
+			xmp_delete_property (xmp, NS_EXIF, "GPSImgDirection");
+			xmp_set_property (xmp, NS_EXIF, "GPSImgDirection", row[3], 0);
+		}
 	}
 
 	if (urn != NULL) {



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