How to use the comiccrawler.mission_manager.mission_manager.add function in comiccrawler

To help you get started, we’ve selected a few comiccrawler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eight04 / ComicCrawler / comiccrawler / gui / main_window.py View on Github external
def _():
					missions = table.selected()
					titles = [ m.title for m in missions ]
					mission_manager.add("library", *missions)
					print("已加入圖書館︰{}".format(", ".join(titles)))
github eight04 / ComicCrawler / comiccrawler / gui.py View on Github external
def libDownloadUpdate():
			missions = mission_manager.get_by_state("library", ("UPDATE",), all=True)
			if not missions:
				messagebox.showerror("Comic Crawler", "沒有新更新的任務")
				return
			mission_manager.add("view", *missions)
			download_manager.start_download()
			self.notebook.select(0)
		self.btn_download_update["command"] = libDownloadUpdate
github eight04 / ComicCrawler / comiccrawler / download_manager.py View on Github external
def analyze_thread():
			err = None
			with load_episodes(mission):
				try:
					Analyzer(mission).analyze()
				except BaseException as _err:
					err = _err
					raise
				else:
					mission_manager.add("view", mission)
				finally:
					if on_finished:
						on_finished(err)
					self.analyze_threads.remove(analyze_thread)
		self.analyze_threads.add(analyze_thread)
github eight04 / ComicCrawler / comiccrawler / gui.py View on Github external
def tvAddToLib():
					missions = table.selected()
					titles = [ m.title for m in missions ]
					mission_manager.add("library", *missions)
					print("已加入圖書館︰{}".format(", ".join(titles)))
github eight04 / ComicCrawler / comiccrawler / gui / main_window.py View on Github external
def lib_download_update():
			missions = mission_manager.get_all("library", lambda m: m.state == "UPDATE")
			if not missions:
				self.messagebox("error", "Comic Crawler", "沒有新更新的任務")
				return
			mission_manager.add("view", *missions)
			download_manager.start_download()
			self.notebook.select(0)
		self.btn_download_update["command"] = lib_download_update
github eight04 / ComicCrawler / comiccrawler / download_manager.py View on Github external
def on_item_finished(err, mission):
			if not err:
				missions.popleft()
				mission_manager.add("view", mission)
				download_ch.pub("BATCH_ANALYZE_UPDATE", list(missions))