[tracker] tracker-extract-playlist: Slightly reduce SPARQL update size



commit b0ccd2887890675a450a7a6562cbfd98b7666d15
Author: Jürg Billeter <j bitron ch>
Date:   Thu Jun 10 15:05:39 2010 +0200

    tracker-extract-playlist: Slightly reduce SPARQL update size
    
    This reduces memory usage in tracker-store a bit for long playlists.

 src/tracker-extract/tracker-extract-playlist.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-playlist.c b/src/tracker-extract/tracker-extract-playlist.c
index be56f82..e867d74 100644
--- a/src/tracker-extract/tracker-extract-playlist.c
+++ b/src/tracker-extract/tracker-extract-playlist.c
@@ -77,7 +77,10 @@ entry_parsed (TotemPlParser *parser, const gchar *to_uri, GHashTable *to_metadat
 	data = (PlaylistMetadata *)user_data;
 	data->track_counter++;
 
-	tracker_sparql_builder_predicate (data->metadata, "nfo:hasMediaFileListEntry");
+	if (data->track_counter == 1) {
+		/* first track, predicate needed */
+		tracker_sparql_builder_predicate (data->metadata, "nfo:hasMediaFileListEntry");
+	}
 
 	tracker_sparql_builder_object_blank_open (data->metadata);
 	tracker_sparql_builder_predicate (data->metadata, "a");



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