示例#1
0
文件: console.py 项目: krig/jamaendo
 def query_artists(self):
     result = jamaendo.search_artists(sys.argv[2])
     pp.pprint([(a.ID, a.name) for a in result])
     for a in result:
         albums = jamaendo.get_albums(a.ID)
         for album in albums:
             print "Playing album: %s - %s" % (a.name, album.name)
             self.play_album(album)
示例#2
0
 def gen():
     generated = []
     for item in jamaendo.favorite_albums(settings.user):
         generated.append(item.ID)
         yield item
     fav = [f[1] for f in settings.favorites \
                if isinstance(f, tuple) and \
                len(f) == 2 and \
                f[0] == 'album' and \
                f[1] not in generated]
     for item in jamaendo.get_albums(fav):
         yield item