[mb-users] Accessing track list from album returned by
MBQ_GetAlbumById
Cameron McCormack
cam-musicbrainz at aka.mcc.id.au
Thu Aug 12 08:41:14 UTC 2004
Hi.
I am using the client library and trying to get a list of tracks from an
album ID. This is the code I am using:
#include <iostream>
#include <vector>
#include <string>
#include <musicbrainz/musicbrainz.h>
using namespace std;
int main()
{
MusicBrainz mb;
vector<string> args;
args.push_back("bc9c06da-0be8-4e01-93a3-9a41261a8de3");
mb.Query(MBQ_GetAlbumById, &args);
mb.Select(MBS_SelectAlbum, 1);
cout << "Album name: " << mb.Data(MBE_AlbumGetAlbumName) << '\n';
cout << "Number of tracks: " << mb.DataInt(MBE_AlbumGetNumTracks) << '\n';
}
The number of tracks seems to be 0. When I use MBQ_GetCDInfo to lookup
the album I get some non-zero number of tracks, but with
MBQ_GetAlbumById, I do not. Can someone point out what I've done wrong?
Thanks,
Cameron
--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922
More information about the MusicBrainz-users
mailing list