my $mas = Music::Audioscrobbler::Submit->new($options);
Get or set options via hash. Here is a list of available options:
|default_options()||Returns a reference to the default options.|
Takes a file, hashref, or Music::Tag object and submits the song to Last.FM now playing info. For example:
The hash reference is of the form:
To submit a song pass an arrayref whose first entry is a File, Music::Tag object, or hashref (see now_playing()) for format) and whose second entry is
an integer representing the seconds since epoch (UNIX time). Several songs can be submitted simultaneously. For example:
The following is taken from <http://www.audioscrobbler.net/development/protocol/>:
The client should monitor the users interaction with the music playing service to whatever extent the service allows. In order to qualify for submission all of the following criteria must be met:
1. The track must be submitted once it has finished playing. Whether it has finished playing naturally or has been manually stopped by the user is irrelevant.
2. The track must have been played for a duration of at least 240 seconds or half the tracks total length, whichever comes first. Skipping or pausing the track is irrelevant as long as the appropriate amount has been played.
3. The total playback time for the track must be more than 30 seconds. Do not submit tracks shorter than this.
4. Unless the client has been specially configured, it should not attempt to interpret filename information to obtain metadata instead of tags (ID3, etc).
|process_scrobble_queue()||Processes the current scrobble queue. Call this if submit fails and you wish to try again. Do not resubmit a song.|
|handshake()||Perform handshake with Last.FM. You dont need to call this, it will be called by submit() or now_playing() when necessary.|
|music_tag_opts()||Get or set the current options for new Music::Tag objects.|
|logfileout()||Glob reference (or IO::File) to current log file. If passed a value, will use this instead of what the logfile option is set to. Any glob reference that can be printed to will work (thats all we ever do).|
Print to log. First argument is a level (0 - 4). For example:
|scrobble_queue()||Returns a reference to the current scrobble_queue. This is a tied hash using Tie::File. Useful to found out how many items still need to be scrobbled after a failed submit().|
|ua()||Returns the LWP::UserAgent used. If passed a value, will use that as the new LWP::UserAgent object.|
Takes a filename, hashref, or Music::Tag object and returns a hash with the structure required by submit() or now_playing.
Normally this is called automatically by submit() or now_playing. See now_playing for syntax of hash.
is functionally equivalent to
Release Name: 0.05
o Added new option: proxy_server to set proxy_server. Also now reads proxy server from enviroment. Release Name: 0.04
o I noticed that Music::Tag was called with a use function. Removed this line to remove Music::Tag requirement. o Added some more level 4 debuging messages. Release Name: 0.03
o Added musictag_overwrite option. This is false by default. It is a workaround for problems with Music::Tag and unicode. Setting this to true allows Music::Tag info to overwrite info from MPD. Do not set this to true until Music::Tag returns proper unicode consistantly. Release Name: 0.02
o Will print error and die if lastfm_password is not set. o Will print error and die if BADAUTH is received. Release Name: 0.01
o Initial Release
Edward Allen III <ealleniii _at_ cpan _dot_ org>
Copyright (c) 2007,2008 Edward Allen III. Some rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either:
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, Ill 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.
|perl v5.20.3||MUSIC::AUDIOSCROBBLER::SUBMIT (3)||2008-06-20|