[tracker/rss-enclosures] Tracker-extract: Make XMP extractor use newer libtracker-extract API.



commit 48ffdb986584f0e3f2241fb1af5aab960e624825
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Apr 8 13:46:51 2010 +0200

    Tracker-extract: Make XMP extractor use newer libtracker-extract API.

 src/tracker-extract/tracker-extract-xmp.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-xmp.c b/src/tracker-extract/tracker-extract-xmp.c
index 5e268e5..a32ee14 100644
--- a/src/tracker-extract/tracker-extract-xmp.c
+++ b/src/tracker-extract/tracker-extract-xmp.c
@@ -133,7 +133,7 @@ extract_xmp (const gchar          *uri,
              TrackerSparqlBuilder *preupdate,
              TrackerSparqlBuilder *metadata)
 {
-	TrackerXmpData xd = { 0 };
+	TrackerXmpData *xd = NULL;
 	GError *error;
 	gchar *filename;
 	gchar *contents;
@@ -149,18 +149,19 @@ extract_xmp (const gchar          *uri,
 		/* If no orig file is found for the sidekick, we use the sidekick to
 		 * describe itself instead, falling back to uri 
 		 */
-		tracker_xmp_read (contents,
-		                  length,
-		                  original_uri ? original_uri : uri,
-		                  &xd);
+		xd = tracker_xmp_new (contents,
+		                      length,
+		                      original_uri ? original_uri : uri);
 
-		tracker_xmp_apply (metadata, uri, &xd);
+                if (xd) {
+                        tracker_xmp_apply (metadata, uri, xd);
+                }
 
 		g_free (original_uri);
+                tracker_xmp_free (xd, TRUE);
 	}
 
 	g_free (filename);
-
 }
 
 TrackerExtractData *



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