Created
January 16, 2013 11:12
-
-
Save moopet/4546412 to your computer and use it in GitHub Desktop.
With a shared MPD server, sometimes other people will add shit music. Stop the rot.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Given a blacklist file with one pattern per line, automatically removes them from your playlist | |
# To nuke an artist or song just do something like: | |
# | |
# echo Nickleback >> /var/music/blacklist.txt | |
BLACKLIST=/var/music/blacklist.txt | |
MPD_HOST=localhost | |
[ -f "$BLACKLIST" ] || touch "$BLACKLIST" | |
while : | |
do | |
mpc current | grep -i -f $BLACKLIST && mpc del $(mpc status -f %position% | head -1) | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment