NAME

AudioFile::Identify::MusicBrainz::Query

DESCRIPTION

The main query object. This is probably the thing you want to use.

METHODS

FileInfoLookup($query)

Perform a MusicBrainz FileInfoLookup query - this is the clever one that I care about. $query here is a hash / hashref where the keys are the information you know:

use AudioFile::Identify::MusicBrainz::Query;
my $query = AudioFile:::Identify::MusicBrainz::Query->new();
$query->FileInfoLookup(
    artist => 'coldplay',
    title => 'yellow',
    items => 30,
) or die "Could not query: " . $query->error();
print "I got ".scalar(@{$query->results})." results\n";

keys you can use in the query are:

trm

the trm - the audio fingerprint of the song. Generating this is a Future Project.

artist

the artist name

album

the album name

track

the track title

tracknum

the track number

secs

the track length in seconds

filename

the filename of the track

This function will return true on success, false on error, and an error will be accessible through the error function.

error

returns the last error generated by Query.

results

returns a listref of AudioFile::Identify::MusicBrainz::Result objects.

result(index)

returns a given result, at a given index.