GithubHelp home page GithubHelp logo

dabajabaza / mocp-scrobbler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fluxid/mocp-scrobbler

0.0 0.0 0.0 395 KB

Last.fm scrobbler for MOC audio player, written in Python (version 3).

Python 100.00%

mocp-scrobbler's Introduction

mocp-scrobbler.py (For Python3)

Last.fm scrobbler for MOC audio player with support for now-playing notifications, daemonization and cache. It needs just Python 3 to run, nothing else.

Works with internet streams (only with properly set tags - usually Icecast streams). Scrobbles on 90% of track or on track change/stop if at least 50% or half minute was played. Supports scrobbling of looped track too.

% python3 mocp-scrobbler.py --help
mocp-scrobbler.py 0.2
Usage:
  mocp-scrobbler.py [--daemon] [--offline] [--verbose | --quiet] [--config=FILE]
  mocp-scrobbler.py --kill [--verbose | --quiet]
  
  -c, --config=FILE  Use this file instead of default config
  -d, --daemon       Run in background, messages will be written to log file
  -k, --kill         Kill existing scrobbler instance and exit
  -o, --offline      Don't connect to service, put everything in cache
  -q, --quiet        Write only errors to console/log
  -v, --verbose      Write more messages to console/log

Installation

Installation is manual. Just put this python script in your $PATH. It doesn't need to configure anything within MOC itself. Before running you need to create configuration file ~/.mocpscrob/config which should look like below:

[scrobbler]
login=YOUR_LASTFM_LOGIN
password=YOUR_PASSWORD
streams=true
hostname=post.audioscrobbler.com

password will be replaced with password_md5 on the first run. Its value will be original value hashed using MD5 algorithm. If you want to change password, just add again password with you new password - password_md5 will be replaced.

streams and hostname are not required, and given values are default.

streams turns on scrobbling when listening to internet streams. If it works incorrectly, set it to false.

hostname may be useful if you want to use different scrobbling service, for example libre.fm (turtle.libre.fm).

Cache, pidfile and logs are placed in ~/.mocpscrob/.

Instead of running in daemon mode, you can run it in GNU Screen:

% screen -dR scrob mocp-scrobbler.py -v

Troubleshooting

Before issuing bugs, please check the following:

  1. Make sure you're using Python in at least version 3.1 (I didn't really test it with Python 3.0)
  2. Check if mocp -i prints what track is currently playing

FAQ

What about other players?

Maybe in future, but as different project.

What about Python 2.x?

Not supported, sorry. Old code can be found in old-python2 tag. It has small bugs, so be prepared.

What about scrobbling API 2?

There is some interest in using this script as gobbler for libre.fm, which AFAIK doesn't support new API yet, so...

mocp-scrobbler's People

Contributors

fluxid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.