GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MUSICMPDSCROBBLE(1) User Contributed Perl Documentation MUSICMPDSCROBBLE(1)

musicmpdscrobble - Perl script to submit tracks to Last.FM from mpd

        musicmpdscrobble --monitor --logfile=STDERR

        This runs musicmpdscrobble in the foreground and prints a nifty little monitor summery.

--daemonize
Run as a daemon. You should set the logfile option if you use this! Note: There is no way to set this option in the config file.
--kill
Kill running process if daemonized. Should work, let me know if it doesn't.
--pidfile
Specify a pid file for daemon mode.
--logfile="/path/to/log/file"
Specify a log file. Set to STDERR or STDOUT for terminal output.
--monitor
Print program status while running. Don't use in daemon mode!
--verbose=n
Set verbosity level of the log (0 through 4)
--config
Set path to config file (default /etc/musicmpdscrobble.conf)
--help
Print summery of command options and quit.
longhelp
Print this.

The configuration file is a perl program. It is evaluated after the script runs, so it is a good idea to run perl -c /etc/musicmpdscrobble.conf after editing it. Here is an example config file:

        #!/usr/bin/perl 
        # Example musicmpdscrobble.conf file
        #
        # This is a perl file.  It must be a hash reference.  This means a comma between 
        # key / value pairs.
        #
        # To check syntax run perl -c musicmpdscrobble.conf
        #

        { 
        # LastFM Username and Password
                lastfm_username   => "riemann42", 
                #lastfm_password   => "secret", 
                lastfm_md5password   => "md5 hash of password here", 

        # Specify mpd_server info.  Default is MPD_HOST or localhost
        #       mpd_server => 'localhost',

        # Specify mpd_port.  Default is MPD_PORT or 6600
        #       mpd_port        => 6600,

        # If you have installed the Music::Tag module, set to 1.
                musictag          => 0,

    # If you want information from musictag to overwrite info from mpd (not recommended) set to 1
        musictag_overwrite => 0,

        # Specify the music_directory path for MPD. 
                music_directory           => "/mnt/media/music/MP3s",

        # Set the verbosity level.  1 through 4.  3 is a good medium 
                verbose           => 3, 

        #Specify the logfile path
                logfile           => "/var/log/musicmpdscrobble.log",

        #Specify the file to write the pid to.
                pidfile => "/var/run/musicmpdscrobble.pid",

        #Specify the file to store pending scrobbles in.
                scrobble_queue    =>  "/var/lib/musicmpdscrobble.queue",

        #Automatically get missing mbid info:
        #       get_mbid_from_mb  => 1,         

        # list of programs to run when a song start.  Accepts the following variables:
        #
        #   %f  filename
        #   %a  Artist
        #   %b  Album
        #   %t  Title
        #   %l  Length of track in seconds
        #   %n  Track number
        #   %m  mbid of track
        #
        #   runonstart => [],

        # list of programs to run after song submit.
        #          runonsubmit => [],
        };

The music tag module is framework for reading tag files. It requires several modules be installed to work correctly.

The major reason to install this is that it will read info from the filename and not just from the MPD database. You can, therefore, submit the MusicBrainz ID, if it is available via Music::Tag. You want to submit the MusicBrainz Track ID because at it (currently) makes you immune from last.fm spam protection and helps improve the last.fm database.

This is BETA code. It does, however, have an official last.fm client id of "MAM." It is not developed by the last.fm folks, and is not guaranteed to even work.

Music::Audioscrobbler::MPD, Music::Tag

Copyright (c) 2007 Edward J. Allen III

Some code and inspiration from Audio::MPD Copyright (c) 2005 Tue Abrahamsen, Copyright (c) 2006 Nicholas J. Humfrey, Copyright (c) 2007 Jerome Quelin

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.

2008-06-23 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.