[mb-devel] Search returns incomplete list of artists
Pete Smith
pete at popcornwebdesign.co.uk
Thu Jan 18 15:28:20 UTC 2007
Hi,
I am using the Perl module MusicBrainz::Client on top of libmusicbrainz (v2)
to perform a search on an artist. However, the list of results is
incomplete. This has only just started happening.
Here is my code:
#!/usr/bin/perl
use MusicBrainz::Client;
use MusicBrainz::Queries ':all';
use strict;
my $mb = MusicBrainz::Client->new();
$mb->query_with_args(MBQ_FileInfoLookup, [undef, 'u2'])
or die $mb->get_query_error();
my $number_results = $mb->get_result_data(MBE_GetNumLookupResults);
$mb->select1(MBS_SelectLookupResult, 1)
or die 'No lookup result';
my $type = $mb->get_result_data(MBE_LookupGetType);
my $frag = $mb->get_fragment_from_url($type);
my $count = 1;
while ($mb->select(MBS_Rewind) and $mb->select1(MBS_SelectLookupResult,
$count++)) {
$mb->select(MBS_SelectLookupResultArtist);
print $mb->get_result_data(MBE_ArtistGetArtistName), "\n";
$mb->select(MBS_Back);
}
Now, this returns the following:
[pete at mother]$ perl search_album.pl
LMC Versus U2
U2 with Coco Freeman
Now, of course the band U2 should be in there - it was a week or so ago.
This is the result from the Musicbrainz website:
U2
Musique vs. U2
LMC vs. U2
Mary J. Blige & U2
U2 & Johnny Cash
U2 and Green Day
U2 with Coco Freeman
LMC Versus U2
Any ideas - it seems to be only returning the last two results.
Cheers,
Pete
----------------------------------------------------------------------------
pete at popcornwebdesign.co.uk
t: 01279 810722
----------------------------------------------------------------------------
Popcorn
1 Riverside Business Park, Stoney Common Road, Stansted, Essex CM24 8PL
t: 01279 812229
f: 0870 831 6999
www.popcornwebdesign.co.uk
This email is confidential. It may also be privileged or otherwise protected
by other legal rules. If you are not the intended recipient please notify
the sender immediately, and delete the message from all locations in your
computer. You should not copy the email or use it for any purpose, or
disclose its contents to any other person: To do so may be unlawful. Email
is subject to possible data corruption you should not rely on advice
contained in an email without obtaining written confirmation of it.
More information about the MusicBrainz-devel
mailing list