[tracker/playlist: 1/2] tracker-extract-playlist: Slightly reduce SPARQL update size
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/playlist: 1/2] tracker-extract-playlist: Slightly reduce SPARQL update size
- Date: Thu, 10 Jun 2010 13:15:58 +0000 (UTC)
commit ba114953756a0e18a366486b881d7866f7385c9f
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]