summaryrefslogtreecommitdiffstats
path: root/pruning_example.py
blob: 93ca7e02a3b58dcddf85a539467484716ad009a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python
from mpdrast import MPDrastClient

from os import environ

mpd_host = environ.get("MPD_HOST", "localhost")
mpd_port = environ.get("MPD_PORT", 6600)

m = MPDrastClient()
m.connect_from_env(mpd_host, mpd_port)

# Keep only one album in the playlist
m.clean_but(1, "album")