def get_list_of_animes(self): """Returns a list of Anime extracted from the content of the animelist""" animes = list() for data in self.anime_data: print(data['anime_title'].encode('utf-8')) animes.append(Anime.from_dict(data)) return animes
def fetchAnisongs(self): user_animes = list() for data in self.user_animelist.anime_data: self.import_dialog.anisong_loading_widget.infoReceived.emit( str(data['anime_title'])) user_animes.append(Anime.from_dict(data)) self.import_dialog.anisong_loading_widget.progressed.emit() # User clicked on Cancel while loading anisongs if not self.import_dialog.anisong_loading_widget.isVisible(): break anisongs = list() for user_anime in user_animes: anisongs += user_anime.songs self.model.insertRows(anisongs) self.import_dialog.anisong_loading_widget.close() self.import_dialog.close()