Music::Tag::Amazon - Plugin module for Music::Tag to get information from Amazon.com
use Music::Tag my $info = Music::Tag->new($filename); my $plugin = $info->add_plugin("Amazon"); $plugin->get_tag; print "Record Label is ", $info->label();
This plugin gathers additional information about a track from amazon, and updates the Music::Tag object.
Music::Tag::Amazon objects must be created by Music::Tag.
If the asin is set, this is used to look up the results instead of the artist name.
This is used to filter results.
title is used only if track is not true, or if trust_title option is set.
tracknum is used only if title is not true, or if trust_track option is set.
Album name is set if necessary.
title is set only if trust_track is true.
track is set only if track is not true or trust_title is true.
highres is tried, then medium-res, then low. If low-res is a gif, it gives up.
Amazon Store Identification Number
Label of Album
Release Date
Universal Product Code.
European Article Number
These values are filled out if the amazon_info option is true.
Music::Tag::Amazon accepts the following options:
Default false. When this is true, and a Music::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.
Default false. When this is true, and a Music::Tag objects's title conflicts with the title of the corresponding track number on the Amazon listing, then the Music::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 Music::Tag object. If trust_title is true, this option is ignored.
Default false. 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.
Amazon Developer token. Change to one given to you by Amazon. REQUIRED OPTION.
Amazon Developer secret key. Change to one given to you by Amazon. REQUIRED OPTION.
Default 10. Minimum number of points an album must have to win election.
Default us. Locale code for store to use. Valid are ca, de, fr, jp, uk or us as of now. Maybe more...
Default false. Return optional info.
Updates current Music::Tag object with information from Amazon database.
Returns and optionally sets reference to underlying LWP user agent.
Returns and optionally sets a reference to the Cache::FileCache object used to cache amazon requests.
Returns and optionally sets reference to the Cache::FileCache object used to cache downloaded cover art.
Returns and optionally sets reference to Net::Amazon object.
Returns the default options for the plugin.
Not used by this plugin.
A list of required values required for get_tag() to work.
A list of values that can be set by this module.
If the asin value is true in the Music::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: 128 points Matches UPC or EAN: 64 points Full name match: 32 points or close name match: 20 points Contains name of track: 10 points or title match: 8 points Matches totaltracks: 4 points Matches year: 2 points Older than last match: 1 points
Highest album wins. A minimum of 10 points 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.
Does not do well with artist who have over 50 releases. Amazon sorts by most popular.
Multi Disc / Volume sets seem to be working now, but support is still questionable.
Please use github for bug tracking: http://github.com/riemann42/Music-Tag-Amazon/issues.
Net::Amazon, Music::Tag
Source is available at github: http://github.com/riemann42/Music-Tag-Amazon.
Edward Allen III <ealleniii _at_ cpan _dot_ org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either:
a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
b) the "Artistic License" which comes with Perl.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details.
You should have received a copy of the Artistic License with this Kit, in the file named "Artistic". If not, I'll be glad to provide one.
You should also have received a copy of the GNU General Public License along with this program in the file named "Copying". If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA or visit their web page on the Internet at http://www.gnu.org/copyleft/gpl.html.
Copyright © 2007,2008,2010 Edward Allen III. Some rights reserved.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming UTF-8
To install Music::Tag::Amazon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Music::Tag::Amazon
CPAN shell
perl -MCPAN -e shell install Music::Tag::Amazon
For more information on module installation, please visit the detailed CPAN module installation guide.