[sound-juicer] Get disc count from musicbrainz.



commit e14751d69201d9e6c2aaef83832e4399cde80c15
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Sun Jul 8 11:14:07 2012 +0100

    Get disc count from musicbrainz.
    
    Helps to tell multiple releases apart where one is a normal release
    and the other is a special release with a bonus disc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674926

 libjuicer/sj-metadata-musicbrainz5.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libjuicer/sj-metadata-musicbrainz5.c b/libjuicer/sj-metadata-musicbrainz5.c
index 8a3f18a..46b8ae8 100644
--- a/libjuicer/sj-metadata-musicbrainz5.c
+++ b/libjuicer/sj-metadata-musicbrainz5.c
@@ -431,6 +431,7 @@ make_album_from_release (Mb5ReleaseGroup group,
   AlbumDetails *album;
   Mb5ArtistCredit credit;
   Mb5RelationListList relationlists;
+  Mb5MediumList media;
   GList *artists;
   char *date = NULL;
   char buffer[512]; /* for the GET macro */
@@ -440,6 +441,10 @@ make_album_from_release (Mb5ReleaseGroup group,
 
   album = g_new0 (AlbumDetails, 1);
 
+  media = mb5_release_get_mediumlist (release);
+  if (media)
+    album->disc_count = mb5_medium_list_size (media);
+
   GET (album->album_id, mb5_release_get_id, release);
   GET (album->title, mb5_medium_get_title, medium);
   if (album->title == NULL)


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