def watch(self): try: if self.name.startswith('magnet'): results = {'magnet': self.name} self.download(results) else: history = History.one(name=self.name, season=self.season, episode=self.episode) if history is None or not hasattr(history, "magnet"): self.search_magnet() else: results = {'magnet': history.magnet} self.download(results) except KeyboardInterrupt: log.info("Thanks for using Touchandgo") _exit(0)
def watch(self): try: if self.name.startswith('magnet'): results = {'magnet': self.name} self.download(results) else: history = None if self.use_cache: history = History.one(name=self.name, season=self.season, episode=self.episode) if history is None or not hasattr(history, "magnet"): self.search_magnet() else: results = {'magnet': history.magnet} self.download(results) except KeyboardInterrupt: log.info("Thanks for using Touchandgo") _exit(0)