Skip to main content

Last.fm scrobbler via MPRIS2 in Linux

Project description

Last.fm scrobbler

A Last.fm scrobbler via MPRIS2 in Linux, implemented via pylast and mpris2

Modified based on dbus-scrobbler

Features

  • scrobble music to Last.fm if one of the conditions are met:

    • played for 4 mins
    • played for half the length
  • update now playing status

  • offline storage support

Alternatives

If you'd like a scrobbler similar to this, there're some choices. I recommand taking a look at scrobblez, which is more functional (at least for now).

Also, although rescrobbled may also work, in my case it raised "Dbus error: argument type mismatch".

What is MPRIS2?

MPRIS (Media Player Remote Interfacing Specification) is a standard D-Bus (Desktop Bus) interface that allows applications to communicate with and control media players running on a Linux desktop environment.

Thus, this scrobbler is a general-purpose one under the Linux desktop environment, supporting scrobble music from media players without a built-in Last.fm scrobbling feature.

Check if your media player supports MPRIS2 via (make sure the player is running):

lastfm-mpris2-scrobbler --list-players

The uri names of players will be shown

Installation

There're two options available now:

  • grab the stand-alone binary from release page

  • or, via PyPI

    pip install lastfm-mpris2-scrobbler
    

Configurations

The program expects a config.yaml file, example and detailed information can be found in config.yaml.example:

# username for that service
user_name: foo

# md5 hash of your password (obtained via `echo -n password | md5sum`)
password_hash: abc123492abccf4f1997f7ccaabc123b

# last.fm api, which can be created via https://www.last.fm/api/account/create
api_key: 11111111111111111111111111111111
api_secret: 11111111111111111111111111111111

# the app's uri you want to scrobble
# use `lastfm-mpris2-scrobbler --list-players` to check the uri name
application_whitelist: [ "org.mpris.MediaPlayer2.harmonoid" ]

Usage

lastfm-mpris2-scrobbler -c PATH_TO_YOUR_CONFIG/config.yaml

For more options, see:

lastfm-mpris2-scrobbler --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lastfm-mpris2-scrobbler-0.3.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lastfm_mpris2_scrobbler-0.3.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file lastfm-mpris2-scrobbler-0.3.0.tar.gz.

File metadata

  • Download URL: lastfm-mpris2-scrobbler-0.3.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for lastfm-mpris2-scrobbler-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ae4313f5f1d7534c34001209c9081e103af26ce3d4209b3b4287ca6cd05b5c45
MD5 d2011606ae3df065274458b01ee2e2c9
BLAKE2b-256 76c2913d09f0b1a52a15f41a69039b05c0e74c216d1946ae7d7a11c58081a53e

See more details on using hashes here.

File details

Details for the file lastfm_mpris2_scrobbler-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lastfm_mpris2_scrobbler-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bf79b385ffe22bb15be85b9e6a8272cae2f7ba4e0eed0469739699d91984a02
MD5 ba9e4d8bece0384cc5d36b0d57696030
BLAKE2b-256 4062ef8ff9970c62ceada3c59170dd133185b3e36ca100e953b02ee87e41dc4c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page