NAME

Music::Tag::Amazon - Plugin module for Music::Tag to get information from Amazon.com

SYNOPSIS

use Music::Tag

my $info = Music::Tag->new($filename);

my $plugin = $info->add_plugin("Amazon"); $plugin->get_tag;

print "Record Label is ", $info->label();

DESCRIPTION

Music::Tag::Amazon is normally created in Music::Tag. This plugin gathers additional information about a track from amazon, and updates the tag object.

REQUIRED VALUES

artist

USED VALUES

asin

If the asin is set, this is used to look up the results instead of the artist name.

album

This is used to filter results.

releasedate

This is used to filter results.

totaltracks

This is used to filter results.

title

title is used only if track is not true, or if trust_title option is set.

tracknum

tracknum is used only if title is not true, or if trust_track option is set.

SET VALUES

album
title

title is set only if trust_track is true.

track

track is set only if track is not true or trust_title is true.

picture

highres is tried, then medium-res, then low. If low-res is a gif, it gives up.

asin
label
releasedate

Music::Tag::Amazon accepts the following options:

quiet

Setting to true turns off status messages.

verbose

Setting to true increases verbosity.

trust_title

When this is true, and a tag object's track number is different than the track number of the song with the same title in the Amazon listing, then the tagobject's tracknumber is updated. In other words, we trust that the song has accurate titles, but the tracknumbers may not be accurate. If this is true and trust_track is true, then trust_track is ignored.

trust_track

When this is true, and a tag objects's title conflicts with the title of the corresponding track number on the Amazon listing, then the tag object's title is set to that of the track number on amazon. In other words, we trust that the track numbers are accurate in the tag object. If trust_title is true, this option is ignored.

coveroverwrite

When this is true, a new cover is downloaded and the current cover is replaced. The current cover is only replaced if a new cover is found.

token

Amazon Developer token. Change to one given to you by Amazon.

amazon_ua

A Net::Amazon object. Used if you want to define your own options for Net::Amazon.

lwp_ua

A LWP::UserAgent object. Used if you want to define your own options.

amazon_cache

A cache object. Used by default Net::Amazon object to store results. A Cache::FileCache object by default.

coverart_cache

A cache object. Used to store coverart in. A Cache::FileCache object by default.

min_album_points

Minimum number of points an album must have to win election. Default 10.

METHODS

get_tag

Updates current tag object with information from Amazon database.

METHEDOLOGY

If the asin value is true in the tag object, then the lookup is done with this value. Otherwise, it performs a search for all albums by artist, and then waits each album to see which is the most likely. It assigns point using the following values:

Matches ASIN:            64 pts
Full name match:         32 pts
 or close name match:    16 pts
Contains name of track:  10 pts
 or title match:         8 pts 
Matches totaltracks:     4 pts
Matches year:            2 pts
Older than last match:   1 pts

Highest album wins. A minimum of 10 pts needed to win the election by default (set by min_album_points option).

Close name match means that both names are the same, after you get rid of white space, articles (the, a, an), lower case everything, translate roman numerals to decimal, etc.

BUGS

Does not do well with artist who have over 50 releases. Amazon sorts by most popular.

10 POD Errors

The following errors were encountered while parsing the POD:

Around line 35:

You forgot a '=back' before '=head1'

Around line 38:

'=item' outside of any '=over'

Around line 40:

You forgot a '=back' before '=head1'

Around line 42:

'=item' outside of any '=over'

Around line 66:

You forgot a '=back' before '=head1'

Around line 68:

'=item' outside of any '=over'

Around line 113:

=pod directives shouldn't be over one line long! Ignoring all 2 lines of content

Around line 162:

You forgot a '=back' before '=head1'

Around line 164:

'=item' outside of any '=over'

Around line 307:

You forgot a '=back' before '=head1'