def get_filebot_version(self): if not self.filebot_version: try: self.filebot_version = pyfilebot.get_version() except pyfilebot.FilebotFatalError: self.filebot_version = None return self.filebot_version
def enable(self): self.config = deluge.configmanager.ConfigManager( "filebottool.conf", DEFAULT_PREFS) try: self.filebot_version = pyfilebot.get_version() log.info("Filebot Found with version {0}".format( self.filebot_version)) except pyfilebot.FilebotFatalError as e: log.error('FilebotFatalError Encountered', exc_info=True) self.filebot_version = None self.torrent_manager = component.get("TorrentManager") plugin_info = component.get("CorePluginManager").get_plugin_info("FileBotTool") self.plugin_version = version_tuple(plugin_info["Version"]) self.listening_dictionary = {} self.processing_torrents = {} #register event/alert hooks: component.get("AlertManager").register_handler("storage_moved_alert", self._on_storage_moved) event_manager = component.get("EventManager") event_manager.register_event_handler("TorrentFolderRenamedEvent", self._on_folder_renamed) event_manager.register_event_handler("TorrentFileRenamedEvent", self._on_file_renamed) event_manager.register_event_handler("TorrentFinishedEvent", self._auto_sort) self.event_manager = event_manager
def enable(self): self.config = deluge.configmanager.ConfigManager( "filebottool.conf", DEFAULT_PREFS) try: self.filebot_version = pyfilebot.get_version() log.info("Filebot Found with version {0}".format( self.filebot_version)) except pyfilebot.FilebotFatalError as e: log.error('FilebotFatalError ' + str(e)) self.filebot_version = None self.torrent_manager = component.get("TorrentManager") self.listening_dictionary = {} #register event/alert hooks: component.get("AlertManager").register_handler("storage_moved_alert", self._on_storage_moved) event_manager = component.get("EventManager") event_manager.register_event_handler("TorrentFolderRenamedEvent", self._on_folder_renamed) event_manager.register_event_handler("TorrentFileRenamedEvent", self._on_file_renamed) event_manager.register_event_handler("TorrentFinishedEvent", self._auto_sort)