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
def create_playlists_from_result(self, playlists): for _playlist in playlists: playlist = Playlist(_playlist['PlaylistID']) playlist.title = u'%s' % (_playlist['Name']) yield playlist
def fill_playlist(self, playlist, fields): playlist.tracks_list = [] _id = Playlist.decode_id(playlist.id) for song in self.browser.get_all_songs_from_playlist(_id): playlist.tracks_list.append(song)