def on_toggle(self): if self.action.isChecked(): #se activo conf.set_addon_option(OPTION_IP_RENEW_ACTIVE, "True") self.connect() else: conf.set_addon_option(OPTION_IP_RENEW_ACTIVE, "False") events.disconnect(cons.EVENT_LIMIT_EXCEEDED, self.event_id)
def on_toggle(self): if self.action.isChecked(): #se activo conf.set_addon_option(OPTION_UNRAR_ACTIVE, "True") self.connect() else: conf.set_addon_option(OPTION_UNRAR_ACTIVE, "False") events.disconnect(cons.EVENT_DL_COMPLETE, self.event_id)
def on_unrar(self, widget): if widget.get_active(): #se activo conf.set_addon_option(OPTION_UNRAR_ACTIVE, "True") self.connect() else: conf.set_addon_option(OPTION_UNRAR_ACTIVE, "False") events.disconnect(cons.EVENT_DL_COMPLETE, self.event_id)
def on_change_ip(self, widget): if widget.get_active(): #se activo conf.set_addon_option(OPTION_IP_RENEW_ACTIVE, "True") self.connect() else: conf.set_addon_option(OPTION_IP_RENEW_ACTIVE, "False") events.disconnect(cons.EVENT_LIMIT_EXCEEDED, self.event_id)
def on_toggle(self): if self.action.isChecked(): #se activo #self.config.set_shutdown_active("True") self.event_id = events.connect(cons.EVENT_ALL_COMPLETE, self.trigger) self.config.set_retries_limit(str(RETRIES_LIMIT)) else: #self.config.set_shutdown_active("False") events.disconnect(cons.EVENT_ALL_COMPLETE, self.event_id) self.config.set_retries_limit(str(self.old_retries_count))
def on_shutdown(self, widget): if widget.get_active(): #se activo #self.config.set_shutdown_active("True") self.event_id = events.connect(cons.EVENT_ALL_COMPLETE, self.trigger) self.config.set_retries_limit(str(RETRIES_LIMIT)) else: #self.config.set_shutdown_active("False") events.disconnect(cons.EVENT_ALL_COMPLETE, self.event_id) self.config.set_retries_limit(str(self.old_retries_count))