Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A last.fm audioscrobbler for MPD in perl

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 pmpds
Octocat-spinner-32 pmpds.1
Octocat-spinner-32 pmpds.conf_example
README.md

pmpds

Synopsis

pmpds is a simple last.fm audioscrobbler for the Music Player Daemon. The script supports the 2.0 protocol and keeps a journal of all the tracks that could not be submitted to last.fm.

pmpds uses IO::Socket to connect to MPD and WWW::Curl to submit the tracks to last.fm. The script comes with scrobble and now-playing support. Additionally, the script supports MPD's idle command.

Requirements

  • MPD >= 0.14

Perl

  • threads
  • threads::shared
  • Thread::Queue (core module)
  • IO::Socket (core module)
  • Encode (core module)
  • Digest::MD5 (core module)
  • Getopt::Long (core module)
  • POSIX (core module)
  • WWW::Curl::Easy (CPAN)
  • URI::Escape (CPAN)

Notes

  • core modules come with perl. The remaining modules have to be installed through CPAN or your local package manager (pacman, yum, apt, etc.).
  • threads and threads::shared are available in perl starting from 5.8
  • When updating from pmpds 0.5.3, you need to rename pmpds.conf to config and pmpds.cache to journal.

Download

Fetch the files with git: git clone git://github.com/vehk/pmpds.git

Usage

You can either install the script yourself or use the makefile.

Use the makefile (easier): sudo make install

I recommend to set up user-specific configuration by copying /etc/pmpds/pmpds.conf to $HOME/.pmpds/config.

To uninstall, run sudo make uninstall.

Install the script yourself if you do not trust make:

  • copy pmpds into a directory listed in your $PATH; e.g /usr/local/bin/
  • copy pmpds.1 to your $MANPATH; e.g /usr/local/share/man/man1/
  • copy pmpds.conf_example to $HOME/.pmpds/config and edit the default configuration. You can also create a system-wide configuration file in /etc/pmpds/pmpds.conf.

AUR

I created and submitted a package to the Arch User Repository. Download it and run makepkg -si.

Notes

When autosubmit is on, pmpds might complain about a missing journal file. As the file is not created until a track is added to the journal, you can safely ignore this warning or simply create an empty journal file with $ touch $HOME/.pmpds/journal.

The script uses a dedicated Thread::Queue that submits queued tracks to last.fm. Therefore, timeouts or other errors won't stop the script from recognizing new tracks (previously, pmpds had to wait for last.fm to return).

Configuration

In order to access your last.fm account, pmpds needs your last.fm credentials. Add these to the configuration file in $HOME/.pmpds/.

Future plans

  • Add a daemon option

Bugs

Please report any bugs or issues on the github page.

License

pmpds is released under GNU GPL v3.0. You can find more information in LICENSE.

Something went wrong with that request. Please try again.