[tracker] Corrected the XINE based extractor



commit 47982e2560e5997697519e79ab61cbc6f7e41123
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Dec 24 13:38:05 2009 +0100

    Corrected the XINE based extractor

 src/tracker-extract/tracker-extract-libxine.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-libxine.c b/src/tracker-extract/tracker-extract-libxine.c
index 86734e6..bd274e0 100644
--- a/src/tracker-extract/tracker-extract-libxine.c
+++ b/src/tracker-extract/tracker-extract-libxine.c
@@ -136,7 +136,7 @@ tracker_extract_xine (const gchar *uri, TrackerSparqlBuilder *metadata)
 		tracker_sparql_builder_object (metadata, "nmm:MusicPiece");
 		tracker_sparql_builder_object (metadata, "nfo:Audio");
 	} else {
-		tracker_sparql_builder_object (metadata, "nfo:FileDataObject");
+		tracker_sparql_builder_object (metadata, "nfo:Media");
 	}
 
 	if (xine_get_pos_length (stream, &pos_stream, &pos_time, &length_time)) {
@@ -213,6 +213,13 @@ tracker_extract_xine (const gchar *uri, TrackerSparqlBuilder *metadata)
 			tracker_sparql_builder_predicate (metadata, "nfo:codec");
 			tracker_sparql_builder_object_unvalidated (metadata, audio_codec);
 		}
+
+		track = xine_get_meta_info (stream, XINE_META_INFO_TRACK_NUMBER);
+		if (track) {
+			tracker_sparql_builder_predicate (metadata, "nmm:trackNumber");
+			tracker_sparql_builder_object_unvalidated (metadata, track);
+		}
+
 	}
 
 
@@ -242,11 +249,6 @@ tracker_extract_xine (const gchar *uri, TrackerSparqlBuilder *metadata)
 		tracker_sparql_builder_object_unvalidated (metadata, genre);
 	}
 
-	track = xine_get_meta_info (stream, XINE_META_INFO_TRACK_NUMBER);
-	if (track) {
-		tracker_sparql_builder_predicate (metadata, "nmm:trackNumber");
-		tracker_sparql_builder_object_unvalidated (metadata, track);
-	}
 
 #if 0
 	/* FIXME: "Video.Copyright" seems missing */
@@ -254,6 +256,8 @@ tracker_extract_xine (const gchar *uri, TrackerSparqlBuilder *metadata)
 	tracker_sparql_builder_object_unvalidated (metadata, NULL);
 #endif
 
+endofit:
+
 	xine_dispose (stream);
 
 	xine_close_audio_driver (xine_base, audio_port);



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