Scropple (Linux)
Scrobbles what your Linux media players play. It follows players over
MPRIS on the session bus — Spotify, Strawberry, Rhythmbox, Elisa, VLC,
mpv (with its mpris script), and anything else that speaks it — and sends
what you play to Scropple-compatible backends: final_track, ircd’s
ScrobbleServ, anything that takes the Scropple HTTP backend’s JSON.
The desktop sibling of scropple-android, with the same rules for what counts as a play.
Install
From the forge’s package repositories
Every push to master builds a .deb (Debian trixie/forky) and an .rpm
(EL9 and newer, Fedora, openSUSE) and publishes them to this repository’s
package registries; a vX.Y.Z tag publishes a release.
# Debian / Ubuntu
curl -fsSL https://gg.neiam.co/pkg/_keys/deb/neiam | sudo tee /etc/apt/keyrings/neiam.asc >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/neiam.asc] https://gg.neiam.co/pkg/deb/neiam/scropple-linux $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/scropple.list
sudo apt update && sudo apt install scropple
# Fedora / RHEL / openSUSE: /etc/yum.repos.d/scropple.repo
# [scropple]
# name=scropple
# baseurl=https://gg.neiam.co/pkg/rpm/neiam/scropple-linux
# enabled=1
# repo_gpgcheck=1
# gpgcheck=0
# gpgkey=https://gg.neiam.co/pkg/_keys/rpm/neiam
sudo dnf install scropple
The package installs /usr/bin/scropple and the user unit; then, as you:
scropple init # config + empty token file
$EDITOR ~/.config/scropple/config.toml
$EDITOR ~/.config/scropple/finaltrack.token
scropple check
systemctl --user enable --now scropple
From source
cargo build --release
install -Dm755 target/release/scropple ~/.local/bin/scropple
scropple init # the example config, and an empty token file (0600)
$EDITOR ~/.config/scropple/config.toml # your backend(s)
$EDITOR ~/.config/scropple/finaltrack.token # a token from the Scrobbling page
scropple check # config and tokens readable?
install -Dm644 contrib/scropple.service ~/.config/systemd/user/scropple.service
systemctl --user daemon-reload
systemctl --user enable --now scropple
journalctl --user -u scropple -f
What counts as a play
As on Android (and Last.fm): a track scrobbles once it’s been played for half its length or 4 minutes, whichever is less; tracks of 30 seconds or less never do. Paused time doesn’t count. A player that doesn’t report a length gets the 4-minute rule. “Now playing” goes out as a track starts.
Each scrobble is kept in a queue (~/.local/state/scropple/queue.sqlite)
per backend until that backend takes it, retried with backoff (a minute,
doubling, at most 6 hours), so plays made offline arrive later. A server
that refuses a play outright (a 4xx such as 422) has it dropped; a network
error, a 5xx, a 429 or a 401/403 is retried.
Which players
MPRIS doesn’t say whether something is music or a video, so, as on Android, it’s by player. By default these are never scrobbled:
- browsers (Firefox, Chromium, Chrome, Brave, Vivaldi, Opera, Edge, LibreWolf, Plasma Browser Integration) — every YouTube video would count;
- KDE Connect and GSConnect — they relay your phone’s playback, which Scropple on the phone already scrobbles;
- playerctld — it re-announces the other players.
[filter] in the config replaces that list (deny) or scrobbles only
what you name (allow).
Commands
scropple / scropple run |
the daemon |
scropple players |
every player on the bus, what it’s playing, whether it would scrobble |
scropple init [--force] |
write the example config to the config path, and an empty private token file |
scropple check |
the config and tokens |
scropple queue |
scrobbles waiting, per backend |
--config PATH for another config. RUST_LOG=scropple_linux=debug logs
every track and state change.
Development
cargo test
cargo clippy --all-targets -- -D warnings
cargo run --example fake_player -- "Pink Floyd" "Time" 40 # a pretend player
cargo run -- players
# the packages, as CI builds them
podman build --target packages --output type=local,dest=./dist -f packaging/Dockerfile .
engine |
what counts as a play: Session (one player’s timing, ported from scropple-android’s ScrobbleSession, with its tests), Filter, Engine |
mpris |
following players on the bus, metadata → tracks |
backend |
the Scropple HTTP contract |
queue |
scrobbles waiting, in SQLite |
daemon |
the wiring |
License
GPL-3.0, as scropple-android.