[sound-juicer] Remove deprecated libmusicbrainz methods.



commit 7bfb07e2c80b71ead9bd2ab0736b6b61f872bfbc
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Thu Apr 19 11:06:56 2012 +0100

    Remove deprecated libmusicbrainz methods.
    
    libmusicbrainz 4.0.1 deprecates the mb4_xxx_get_relationlist methods in
    favor of mb4_xxx_get_relationlistlist methods to enable access to all
    the relationlists associated with an object. Loop over all lists instead
    of just the one that was returned with mb4_xxx_get_relationlist.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661646

 libjuicer/sj-metadata-musicbrainz4.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/libjuicer/sj-metadata-musicbrainz4.c b/libjuicer/sj-metadata-musicbrainz4.c
index 29e5bf7..5f6b71a 100644
--- a/libjuicer/sj-metadata-musicbrainz4.c
+++ b/libjuicer/sj-metadata-musicbrainz4.c
@@ -421,9 +421,11 @@ make_album_from_release (Mb4ReleaseGroup group,
 {
   AlbumDetails *album;
   Mb4ArtistCredit credit;
+  Mb4RelationListList relationlists;
   GList *artists;
   char *date = NULL;
   char buffer[512]; /* for the GET macro */
+  unsigned int i;
 
   g_assert (release);
   g_return_val_if_fail (medium != NULL, NULL);
@@ -458,13 +460,21 @@ make_album_from_release (Mb4ReleaseGroup group,
         || g_str_has_suffix (album->type, "Audiobook")) {
       album->is_spoken_word = TRUE;
     }
-    fill_relations (mb4_releasegroup_get_relationlist(group), album);
+    relationlists = mb4_releasegroup_get_relationlistlist (group);
+    for (i = 0;
+         relationlists && i < mb4_relationlist_list_size (relationlists);
+         i++)
+      fill_relations (mb4_relationlist_list_item(relationlists, i), album);
   }
 
   album->disc_number = mb4_medium_get_position (medium);
   fill_tracks_from_medium (medium, album);
   fill_album_composer (album);
-  fill_relations (mb4_release_get_relationlist (release), album);
+  relationlists = mb4_release_get_relationlistlist (release);
+  for (i = 0;
+       relationlists && i < mb4_relationlist_list_size (relationlists);
+       i++)
+    fill_relations (mb4_relationlist_list_item (relationlists, i), album);
 
   sj_mb4_album_details_dump (album);
   return album;



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