def find_partial_downloads(self, podcasts): def start_progress_callback(count): self.start_progress(_("Loading incomplete downloads")) def progress_callback(title, progress): self.start_progress("%s (%d%%)" % (_("Loading incomplete downloads"), progress * 100)) def finish_progress_callback(resumable_episodes): self.end_progress() self.resumable_episodes = resumable_episodes self.do_offer_download_resume.emit() common.find_partial_downloads(podcasts, start_progress_callback, progress_callback, finish_progress_callback)
def find_partial_downloads(self, podcasts): def start_progress_callback(count): self.start_progress(_('Loading incomplete downloads')) def progress_callback(title, progress): self.start_progress( '%s (%d%%)' % (_('Loading incomplete downloads'), progress * 100)) def finish_progress_callback(resumable_episodes): self.end_progress() self.resumable_episodes = resumable_episodes self.do_offer_download_resume.emit() common.find_partial_downloads(podcasts, start_progress_callback, progress_callback, finish_progress_callback)
def find_partial_downloads(self, podcasts): def start_progress_callback(count): self.controller.startProgress.emit(_('Loading incomplete downloads')) def progress_callback(title, progress): self.controller.startProgress.emit('%s (%d%%)' % ( _('Loading incomplete downloads'), progress*100)) def finish_progress_callback(resumable_episodes): self.controller.endProgress.emit() self.resumable_episodes = resumable_episodes self.do_offer_download_resume.emit() common.find_partial_downloads(podcasts, start_progress_callback, progress_callback, finish_progress_callback)