Re: Can't figure out how to get the artist name from a DiscID
Andy Hawkins <[email protected]> Wed, 8 Apr 2015 13:18:20 +0000 (UTC)
| Newsgroups | gmane.comp.audio.musicbrainz.devel |
|---|---|
| Organization | Gently |
| Message-ID | <[email protected]> |
Hi David, In article <[email protected]>, David Baltimore<[email protected]> wrote: > 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