def keep(args): songs = parser.parse(args.collection) remove_songs = [s for s in mpd.get_playlist_songs() if s not in songs] if remove_songs: mpd.remove(remove_songs)
def remove(args): songs = list(parser.parse(args.collection)) if songs: mpd.remove(songs)