Ejemplo n.º 1
0
    def get_playlist(self, _id):
        with self.browser:
            playlist = Playlist(_id)
            playlist.tracks_list = []
            for song in self.browser.get_all_songs_from_playlist(_id):
                playlist.tracks_list.append(song)

            return playlist
Ejemplo n.º 2
0
 def create_playlists_from_result(self, playlists):
     for _playlist in playlists:
         playlist = Playlist(_playlist['PlaylistID'])
         playlist.title = u'%s' % (_playlist['Name'])
         yield playlist