a rust application to scrobble your currently playing song on last.fm with mpris
Find a file
2024-08-27 18:03:19 -07:00
src .env pwd configuration to ini xdg configuration 2024-08-27 17:15:36 -07:00
.editorconfig init commit 2024-08-22 00:34:43 -07:00
.gitignore init commit 2024-08-22 00:34:43 -07:00
Cargo.lock .env pwd configuration to ini xdg configuration 2024-08-27 17:15:36 -07:00
Cargo.toml .env pwd configuration to ini xdg configuration 2024-08-27 17:15:36 -07:00
config.example.ini .env pwd configuration to ini xdg configuration 2024-08-27 17:15:36 -07:00
flake.lock init commit 2024-08-22 00:34:43 -07:00
flake.nix untested home-manager module 2024-08-27 18:03:19 -07:00
README.md untested home-manager module 2024-08-27 18:03:19 -07:00
toolchain.toml init commit 2024-08-22 00:34:43 -07:00

lastfmpris

a rust application to scrobble your currently playing song on last.fm with mpris

limitations

unfortunately, because of how most mpris players work, the Track_Id (unique identifier for every song in the tracklist) object is very rarely supported, or, if supported, implemented incorrectly (looking at you, Cider) meaning it is impossible to tell if the track has been played twice in a row. this means you cannot have succssive scrobbles of the same song, sorry! besides this, i'd say the program is feature complete.

also you can't configure the program through nix yet because i'm lazy, i'll do that sometime!!

configuration

either run the program once and navigate to .config/lastmpris/config.ini or create the file and copy it from the config.example.ini file provided in this directory. once you do that, configure your authentication methods. the api keys are available here

you also have the option to define your mpris bus name, which will instead wait for your specified player instead of waiting for the first active player

how to install

you have two methods of installation

  1. install with cargo + your package manager of choice

    1. obtain dependencies (this will vary on your package manager)
    sudo apk add install pkgconf openssl dbus
    
    1. run/build
    cargo build --release
    
  2. install using nix

    simply run it with nix:

    nix run git+https://git.reidlab.pink/reidlab/lastfmpris
    

    or put it into your flake as such:

    # add this into your flake inputs:
    lastfmpris.url = "git+https://git.reidlab.pink/reidlab/lastfmpris";
    # add this to your `homeConfiguration`:
    imports = [
      inputs.lastfmpris.nixosModules.lastfmpris
    ];
    

    and then just add this to use it as a home-manager option:

    # add this to your home-manager configuration:
    services.lastfmpris = {
      enable = true;
    };