[tracker/multidisc-album] tracker-extract: mp3: Ensure that a Disc1 MusicAlbumDisc exists
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/multidisc-album] tracker-extract: mp3: Ensure that a Disc1 MusicAlbumDisc exists
- Date: Tue, 7 Dec 2010 15:02:03 +0000 (UTC)
commit edc007982d66d3cf79689143e6a73830f44a6865
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Dec 7 16:01:16 2010 +0100
tracker-extract: mp3: Ensure that a Disc1 MusicAlbumDisc exists
src/tracker-extract/tracker-extract-mp3.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 3764a18..ee1a378 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -2338,11 +2338,12 @@ extract_mp3 (const gchar *uri,
tracker_sparql_builder_object_int64 (metadata, md.track_number);
}
- if (md.set_number > 0) {
+ if (md.album) {
gchar *album_disc_uri;
album_disc_uri = tracker_sparql_escape_uri_printf ("urn:album-disc:%s:Disc%d",
- md.album, md.set_number);
+ 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);
@@ -2364,7 +2365,7 @@ 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, "nmm:setNumber");
- tracker_sparql_builder_object_int64 (preupdate, md.set_number);
+ 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]