Discussion:
[mb-devel] Can't figure out how to get the artist name from a DiscID
David Baltimore
2015-04-01 17:16:35 UTC
Permalink
Hi,

I have spent countless hours trying to get the Artist name from a
DiscID. The CRelease has a CArtist in it but it's always NULL, yet
when I cout << *FullRelease in the sample code the Artist Name is there.

The documentation is not at all helpful. ANY help would be greatly
appreciated.

Thanks,
David
Andy Hawkins
2015-04-08 13:18:20 UTC
Permalink
Hi David,
Post by David Baltimore
I have spent countless hours trying to get the Artist name from a
DiscID. The CRelease has a CArtist in it but it's always NULL, yet
when I cout << *FullRelease in the sample code the Artist Name is there.
The documentation is not at all helpful. ANY help would be greatly
appreciated.
The sample code shows you how to do this. Using the library requires a good
understanding of what responses come back when you make calls into the web
service. I'd recommend you always understand what queries you want to send
to the webservice, and what responses to expect.

In short.

1. Do a discid query for the discid you want to look up
2. From this, retrieve the ReleaseList
3. For each Release ID, perform a release query, including any extra
parameters you need (artists etc.)
4. If you want information related to the specific disk rather than the
release as a whole, you need to filter the list of media that match the
original disk id.

Take a look at the code in examples/cdlookup.cc and it should hopefully
become clearer. I'd also recommend a thorough reading of the WS
documentation, as the library is just a very thin wrapper around this.

Andy
David Baltimore
2015-04-13 19:34:58 UTC
Permalink
Hi Andy,

Thanks for the reply. I started with the cdlookup example and it did
dump a ton of info to cout.
I had no idea how to get to the Artist name.

I read the xml sections of the online documentation but it made no
sense to me. I trried to requery the release after the discid but it
always came back with an error and I have no idea how to ask for an
artist name in addition to the release info.
Post by Andy Hawkins
3. For each Release ID, perform a release query, including any extra
parameters you need (artists etc.)
4. If you want information related to the specific disk rather than the
release as a whole, you need to filter the list of media that match the
original disk id.
I don't know how to do the above!


Also what is it you are referring to in this statement. "I'd also
recommend a thorough reading of the WS
documentation," I thought I read the whole website.

Still at a loss here. I don't know how to requery for specific information.

Regards,
David
Post by Andy Hawkins
Hi David,
Post by David Baltimore
I have spent countless hours trying to get the Artist name from a
DiscID. The CRelease has a CArtist in it but it's always NULL, yet
when I cout << *FullRelease in the sample code the Artist Name is there.
The documentation is not at all helpful. ANY help would be greatly
appreciated.
The sample code shows you how to do this. Using the library requires a good
understanding of what responses come back when you make calls into the web
service. I'd recommend you always understand what queries you want to send
to the webservice, and what responses to expect.
In short.
1. Do a discid query for the discid you want to look up
2. From this, retrieve the ReleaseList
3. For each Release ID, perform a release query, including any extra
parameters you need (artists etc.)
4. If you want information related to the specific disk rather than the
release as a whole, you need to filter the list of media that match the
original disk id.
Take a look at the code in examples/cdlookup.cc and it should hopefully
become clearer. I'd also recommend a thorough reading of the WS
documentation, as the library is just a very thin wrapper around this.
Andy
_______________________________________________
MusicBrainz-devel mailing list
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel
Andy Hawkins
2015-04-14 15:10:40 UTC
Permalink
Hi,
Post by David Baltimore
Post by Andy Hawkins
3. For each Release ID, perform a release query, including any extra
parameters you need (artists etc.)
4. If you want information related to the specific disk rather than the
release as a whole, you need to filter the list of media that match the
original disk id.
I don't know how to do the above!
That's exactly what the example code in cdlookup.cc does!
Post by David Baltimore
Also what is it you are referring to in this statement. "I'd also
recommend a thorough reading of the WS
documentation," I thought I read the whole website.
Still at a loss here. I don't know how to requery for specific information.
The documentation for the MusicBrainz web service is here:

https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2

This should be your starting point. Until you can generate queries in your
browser that return you the correct information, you're going to struggle to
do it using libmb. As I said in the last message, libmb is nothing but a
very thin wrapper around the data received from the web service.

If you have any specific questions, I'm more than happy to try and help.

Andy

Loading...