Play random songs within your MPD database.
Project focus is to be as simple and stupid as possible.
This script was inspired by oldlaptop's mprand script, written in Tcl, which isn't simple (in a bad way) nor stupid. Thanks to him for his help and inspiration.
Install the dependency first.
pacman -S python-mpd2pkg install py311-python-mpd2Then install the script:
sudo make installMake sure MPD is running, then run:
mprandBehavior:
- If MPD is not playing, it will start playback.
- If the playlist is empty, it will enqueue two songs.
- If the playlist already contains songs, it will only enqueue a new one when you reach the last or second-to-last track.
-q, --quiet Disable logging output
-s, --host HOST MPD host (default: localhost)
-p, --port PORT MPD port (default: 6600)
-h, --help Show help and exit
-P, --password MPD password (if required)
If you find any bugs or think you know a way to improve my shitty code, feel free to create a pull request or something idk.
You can also find me on irc (libera.chat) @ repoman
and on Telegram @repomansez
example.mp4
crash if cleaning the playlist more than once, too lazy to fix it rn