Example #1
0
 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())
Example #2
0
 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())
Example #3
0
 def songs(self):
     songs = set()
     for s in mpd_kit.listallinfo():
         song = Song(**s)
         songs.add(song)
     return self._enumerate(songs, 'title')