[tracker] tracker-extract: flac: Ensure that a Disc1 MusicAlbumDisc exists
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: flac: Ensure that a Disc1 MusicAlbumDisc exists
- Date: Thu, 9 Dec 2010 11:04:03 +0000 (UTC)
commit 78bbbdebbfd2a19a6c8726ee7e38330000036390
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Dec 7 15:59:46 2010 +0100
tracker-extract: flac: Ensure that a Disc1 MusicAlbumDisc exists
src/tracker-extract/tracker-extract-flac.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-flac.c b/src/tracker-extract/tracker-extract-flac.c
index 44769bf..6e557c3 100644
--- a/src/tracker-extract/tracker-extract-flac.c
+++ b/src/tracker-extract/tracker-extract-flac.c
@@ -326,11 +326,12 @@ extract_flac (const gchar *uri,
add_tuple (metadata, "nie:title", fd.title);
add_tuple (metadata, "nmm:trackNumber", fd.tracknumber);
- if (fd.discno && fd.album && album_uri) {
+ if (fd.album && album_uri) {
gchar *album_disc_uri;
album_disc_uri = tracker_sparql_escape_uri_printf ("urn:album-disc:%s:Disc%d",
- fd.album, atoi(fd.discno));
+ fd.album,
+ fd.discno ? atoi(fd.discno) : 1);
tracker_sparql_builder_insert_open (preupdate, NULL);
tracker_sparql_builder_subject_iri (preupdate, album_disc_uri);
@@ -352,7 +353,7 @@ extract_flac (const gchar *uri,
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, atoi (fd.discno));
+ tracker_sparql_builder_object_int64 (preupdate, fd.discno ? atoi (fd.discno) : 1);
tracker_sparql_builder_insert_close (preupdate);
tracker_sparql_builder_delete_open (preupdate, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]