[tracker] tracker-extract: mp3: Group the INSERTs for MusicAlbumDisc together



commit d9fc60cacbc956b6977277c974cf632340374410
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Dec 9 15:01:21 2010 +0100

    tracker-extract: mp3: Group the INSERTs for MusicAlbumDisc together

 src/tracker-extract/tracker-extract-mp3.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index ee1a378..efa90e1 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -2345,12 +2345,6 @@ extract_mp3 (const gchar          *uri,
 		                                                   md.album,
 		                                                   md.set_number > 0 ? md.set_number : 1);
 
-		tracker_sparql_builder_insert_open (preupdate, NULL);
-		tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
-		tracker_sparql_builder_predicate (preupdate, "a");
-		tracker_sparql_builder_object (preupdate, "nmm:MusicAlbumDisc");
-		tracker_sparql_builder_insert_close (preupdate);
-
 		tracker_sparql_builder_delete_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
 		tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
@@ -2362,12 +2356,6 @@ extract_mp3 (const gchar          *uri,
 		tracker_sparql_builder_object_variable (preupdate, "unknown");
 		tracker_sparql_builder_where_close (preupdate);
 
-		tracker_sparql_builder_insert_open (preupdate, NULL);
-		tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
-		tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
-		tracker_sparql_builder_object_int64 (preupdate, md.set_number > 0 ? md.set_number : 1);
-		tracker_sparql_builder_insert_close (preupdate);
-
 		tracker_sparql_builder_delete_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
 		tracker_sparql_builder_predicate (preupdate, "nmm:albumDiscAlbum");
@@ -2381,6 +2369,10 @@ extract_mp3 (const gchar          *uri,
 
 		tracker_sparql_builder_insert_open (preupdate, NULL);
 		tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
+		tracker_sparql_builder_predicate (preupdate, "a");
+		tracker_sparql_builder_object (preupdate, "nmm:MusicAlbumDisc");
+		tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
+		tracker_sparql_builder_object_int64 (preupdate, md.set_number > 0 ? md.set_number : 1);
 		tracker_sparql_builder_predicate (preupdate, "nmm:albumDiscAlbum");
 		tracker_sparql_builder_object_iri (preupdate, md.album_uri);
 		tracker_sparql_builder_insert_close (preupdate);



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