[tracker/tracker-0.10] tracker-extract-playlist: Limit playlists to 1000 entries



commit 26c8f9f1fddbef693b7830ef4a5c6a1366229eed
Author: JÃrg Billeter <j bitron ch>
Date:   Tue Jul 19 11:15:08 2011 +0200

    tracker-extract-playlist: Limit playlists to 1000 entries
    
    Fixes NB#269986.

 src/tracker-extract/tracker-extract-playlist.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-playlist.c b/src/tracker-extract/tracker-extract-playlist.c
index 765074f..90d3449 100644
--- a/src/tracker-extract/tracker-extract-playlist.c
+++ b/src/tracker-extract/tracker-extract-playlist.c
@@ -77,6 +77,11 @@ entry_parsed (TotemPlParser *parser, const gchar *to_uri, GHashTable *to_metadat
 	data = (PlaylistMetadata *)user_data;
 	data->track_counter++;
 
+	if (data->track_counter > 1000) {
+		/* limit playlists to 1000 entries for query performance reasons */
+		return;
+	}
+
 	if (data->track_counter == 1) {
 		/* first track, predicate needed */
 		tracker_sparql_builder_predicate (data->metadata, "nfo:hasMediaFileListEntry");



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