Release Group of an Artist using libmusicbrainz5

Hi again,
Today we will see how to get Release List of the Artists. This process is general, i.e. we can get any Mb5Entity corresponding to any Mb5Entity. For example, You want to get Release Groups of Westlife. Or for the song “I Lay My Love On You” you want to get its Release Group. The code to do this is here:
Here, I will not give some details like freeing memory, error checking etc. You can do it on your own, only the concept/approach of how to solve the problem will be shown.
It is easy to obtain the ReleaseGroups related to “Westlife”. If you have seen the lookup syntax, then there is a parameter named “inc”. This specifies which more data you want to obtain besides the one you are requesting. But make sure you have the MBID of the Mb5Entity for which you are requesting additional data. This is one of the main use of MBID. Here, the following procedure has been adopted after getting the MBID and Name of the Artist from the ArtistList. We do the following:
1. Perform a new query with ParameterName2 and ParameterValue2 array and the MBID of the artist.
2. ParameterName2 array contains string “inc”.
3. ParameterValue2 array contains string “release-group”, if you want to add more than one thing like you want to get release-group, label of the artist. Then use spaces between strings i.e. “release-group label”.
4. Pass the entity string about which you want to get more data as second parameter. Here we pass “artist”.
6. Then pass the MBID of the Entity.
7. Now you can get data using mb5_metadata_get_releasegroup_list() and other functions. Similar to what we have done earlier.

Thats very easy isn’t it. 😉
Thank You. Next time we will see how to perform Disc Search using DiscID.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s