[tracker] tracker-extract: gstreamer: Ensure that a Disc1 MusicAlbumDisc exists
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: gstreamer: Ensure that a Disc1 MusicAlbumDisc exists
- Date: Thu, 9 Dec 2010 11:04:08 +0000 (UTC)
commit 02baac39e2f3baa9bd1012303ca8d6692043beb3
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Dec 7 16:00:31 2010 +0100
tracker-extract: gstreamer: Ensure that a Disc1 MusicAlbumDisc exists
src/tracker-extract/tracker-extract-gstreamer.c | 77 +++++++++++------------
1 files changed, 38 insertions(+), 39 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index c9d974d..574de47 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -643,50 +643,49 @@ extract_metadata (MetadataExtractor *extractor,
GST_TAG_ALBUM_VOLUME_NUMBER,
&count);
- if (has_it) {
- album_disc_uri = tracker_sparql_escape_uri_printf ("urn:album-disc:%s:Disc%d",
- albumname, count);
+ album_disc_uri = tracker_sparql_escape_uri_printf ("urn:album-disc:%s:Disc%d",
+ albumname,
+ has_it ? count : 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_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");
- tracker_sparql_builder_object_variable (preupdate, "unknown");
- tracker_sparql_builder_delete_close (preupdate);
- tracker_sparql_builder_where_open (preupdate);
- tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
- tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
- tracker_sparql_builder_object_variable (preupdate, "unknown");
- tracker_sparql_builder_where_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");
+ tracker_sparql_builder_object_variable (preupdate, "unknown");
+ tracker_sparql_builder_delete_close (preupdate);
+ tracker_sparql_builder_where_open (preupdate);
+ tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
+ tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
+ 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, count);
- tracker_sparql_builder_insert_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, has_it ? count : 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");
- tracker_sparql_builder_object_variable (preupdate, "unknown");
- tracker_sparql_builder_delete_close (preupdate);
- tracker_sparql_builder_where_open (preupdate);
- tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
- tracker_sparql_builder_predicate (preupdate, "nmm:albumDiscAlbum");
- tracker_sparql_builder_object_variable (preupdate, "unknown");
- tracker_sparql_builder_where_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");
+ tracker_sparql_builder_object_variable (preupdate, "unknown");
+ tracker_sparql_builder_delete_close (preupdate);
+ tracker_sparql_builder_where_open (preupdate);
+ tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
+ tracker_sparql_builder_predicate (preupdate, "nmm:albumDiscAlbum");
+ 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:albumDiscAlbum");
- tracker_sparql_builder_object_iri (preupdate, album_uri);
- tracker_sparql_builder_insert_close (preupdate);
- }
+ tracker_sparql_builder_insert_open (preupdate, NULL);
+ tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
+ tracker_sparql_builder_predicate (preupdate, "nmm:albumDiscAlbum");
+ tracker_sparql_builder_object_iri (preupdate, album_uri);
+ tracker_sparql_builder_insert_close (preupdate);
has_it = gst_tag_list_get_double (extractor->tagcache,
GST_TAG_ALBUM_GAIN,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]