Delete Duplicates In MPD Playlist

This is a quick hack in python3 to prune duplicates in the active mpd playlist.
It looks for duplicates by filename. Requires mpc to be installed and respects MPD_HOST and MPD_PORT environment variables.

Sidenote: This is one of my very first python scripts. I am pretty sure this can be done much smarter in python but i am not that skilled yet in that language. So please feel free to improve it. Feedback of any kind is highly appreciated.


Copy and paste the code to some file: e.g: /usr/local/bin/
Run it like that:

Leave a Reply

Your email address will not be published / Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.