Crates.io | mscout |
lib.rs | mscout |
version | 0.3.0 |
source | src |
created_at | 2023-07-15 06:24:26.316833 |
updated_at | 2023-07-15 06:24:26.316833 |
description | scout for mpd, listens for events, tracks the statistics, stores them either in mpd stickers or writes them directly to the metadata for permanent storage |
homepage | https://github.com/hardfau18/mscout |
repository | https://github.com/hardfau18/mscout |
max_upload_size | |
id | 917003 |
size | 101,723 |
Its a plugin for mpd, which handles rating for each song based on play count and skip counts.
NOTE: This doesn't work if consume is enabled
mpd
rust <optional only if building from source>
building from source
Git clone https://github.com/hardfau18/mscout.git
cd mscout
cargo build --release
cp target/release/mscout ~/.local/bin
~/.local/bin/
path is not set then export PATH=~/.local/bin:$PATH
. To make it permanent add it in ~/.bashrc
file.To run mscout
, mpd
should be running in background and should be listening on the local network socket or unix socket file.
To configure mpd to listening on network socket add these two lines to mpd.conf file.
bind_to_address "any"
port "6600"
To listen on unix socket file put the below line. make sure that ~/.local/run/mpd
folder exists if not create it by mkdir ~/.local/run/mpd
.
bind_to_address "~/.local/run/mpd/socket"
There are 2 ways to store stats of songs.
--socket-path <path to socket file>
option or --root-dir <path to mpd music directory>
and with that --use-tags
option.If you don't want give --use-tags
each time you can export MSCOUT_USE_TAGS=1
variable.
For listening on network socket with mpd sticker database
mscout -a 127.0.0.1:6600 -L
For listening on network socket with id3 tags
mscout -a 127.0.0.1:6600 --use-tags -r <mpd music directory > -L
For listening on socket file with id3 tags
mscout -p ~/.local/run/mpd/socket --use-tags -L
To get rating for a particular song use get-stats option. For example to get stats for current song
mscout -a 127.0.0.1:6600 -G --current
Or to get stats for any other song, give a path relative to mpd music directory
mscout -a 127.0.0.1:6600 -G <relative path to song>
To get stats from whole playlist.
mscout -G --playlist <playlist> ...
To get stats from currrent queue.
mscout -G -Q
use -s flags to get exact play and skip count