init commit

This commit is contained in:
Reid 2024-08-22 00:34:43 -07:00
commit 6899d676aa
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
15 changed files with 1490 additions and 0 deletions

39
README.md Normal file
View file

@ -0,0 +1,39 @@
# 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](https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Simple-Type:Track_Id) (unique identifier for every song in the tracklist) object is very rarely supported, or, if supported, implemented incorrectly (looking at you, [Cider](https://cider.sh/)) 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.
## configuration
copy the values from `.env.example` into a `.env` file and configure your api keys, and the api keys are available [here](https://www.last.fm/login?next=/api/account/create)
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
*if you're on a setup that uses nix, you can just use `nix build` or the provided devshell to build the application.*
first, clone repository:
```sh
git clone https://git.reidlab.pink/reidlab/lastfmpris && cd lastfmpris
```
second, obtain dependencies (this will vary on your package manager, here, alpine is used)
```sh
sudo apk add install pkgconf openssl dbus
```
finally, run/build
```sh
cargo run
```
```sh
cargo build --release
```