def load(self): try: webcast_uris = utils.load_db(self.preview_db_file) except: webcast_uris = None if webcast_uris: webcasts = [ WebcastDB.get_song(uri) for uri in webcast_uris] else: webcasts = None if webcasts: self.add_webcasts(webcasts)
def load(self): try: webcast_uris = utils.load_db(self.preview_db_file) except: webcast_uris = None if webcast_uris: webcasts = [WebcastDB.get_song(uri) for uri in webcast_uris] else: webcasts = None if webcasts: self.add_webcasts(webcasts)
def load_collect_data(self): try: collected_objs = utils.load_db(self.collected_db_file) except: collected_objs = None if collected_objs: songs = [ WebcastDB.get_song(uri) for uri in collected_objs] else: songs = None if songs: songs = [ song for song in songs if song.get("collected", False)] if songs: self.collected_view.add_webcasts(songs)
def load_collect_data(self): try: collected_objs = utils.load_db(self.collected_db_file) except: collected_objs = None if collected_objs: songs = [WebcastDB.get_song(uri) for uri in collected_objs] else: songs = None if songs: songs = [song for song in songs if song.get("collected", False)] if songs: self.collected_view.add_webcasts(songs)