def songs_by_artist(self, artist_name): predicate = lambda s: s if s.get('artist', None) == artist_name else None return filter(predicate, mpd_kit.listallinfo())
def songs_by_album(self, album_name): predicate = lambda s: s if s.get('album', None) == album_name else None return filter(predicate, mpd_kit.listallinfo())
def songs(self): songs = set() for s in mpd_kit.listallinfo(): song = Song(**s) songs.add(song) return self._enumerate(songs, 'title')