[tracker] tracker-extract: Don't guess nie:contentCreated for songs



commit 878121472f779f4bab7cd653bb813566a8146b77
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Jan 19 14:38:04 2011 +0100

    tracker-extract: Don't guess nie:contentCreated for songs
    
    Fixes NB#220373.

 src/tracker-extract/tracker-extract-flac.c |    2 +-
 src/tracker-extract/tracker-extract-mp3.c  |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-flac.c b/src/tracker-extract/tracker-extract-flac.c
index 34ab903..c0eeffb 100644
--- a/src/tracker-extract/tracker-extract-flac.c
+++ b/src/tracker-extract/tracker-extract-flac.c
@@ -374,7 +374,7 @@ extract_flac (const gchar          *uri,
 	/* FIXME: Trackgain/Trackpeakgain: commented out in vorbis */
 
 	add_tuple (metadata, "nie:comment", fd.comment);
-	tracker_guarantee_date_from_file_mtime (metadata, "nie:contentCreated", fd.date, uri);
+	add_tuple (metadata, "nie:contentCreated", fd.date);
 	add_tuple (metadata, "nfo:genre", fd.genre);
 	add_tuple (metadata, "nie:plainTextContent", fd.lyrics);
 	add_tuple (metadata, "nie:copyright", fd.copyright);
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 0df4783..07cc6c4 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -2306,10 +2306,10 @@ extract_mp3 (const gchar          *uri,
 		tracker_sparql_builder_object_iri (metadata, md.album_uri);
 	}
 
-	tracker_guarantee_date_from_file_mtime (metadata,
-	                                        "nie:contentCreated",
-	                                        md.recording_time,
-	                                        uri);
+	if (md.recording_time) {
+		tracker_sparql_builder_predicate (metadata, "nie:contentCreated");
+		tracker_sparql_builder_object_unvalidated (metadata, md.recording_time);
+	}
 
 	if (md.genre) {
 		tracker_sparql_builder_predicate (metadata, "nfo:genre");



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