summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/RestartFailed.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/RestartFailed.py')
-rw-r--r--module/plugins/hooks/RestartFailed.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py
index e1498b0ae..74d570425 100644
--- a/module/plugins/hooks/RestartFailed.py
+++ b/module/plugins/hooks/RestartFailed.py
@@ -6,17 +6,18 @@ from module.plugins.internal.Addon import Addon
class RestartFailed(Addon):
__name__ = "RestartFailed"
__type__ = "hook"
- __version__ = "1.61"
+ __version__ = "1.62"
__status__ = "testing"
- __config__ = [("interval", "int", "Check interval in minutes", 90)]
+ __config__ = [("activated", "bool", "Activated" , False),
+ ("interval" , "int" , "Check interval in minutes", 90 )]
__description__ = """Restart all the failed downloads in queue"""
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- MIN_CHECK_INTERVAL = 15 * 60 #: 15 minutes
+ PERIODICAL_INTERVAL = 15 * 60 #: 15 minutes
def periodical(self):
@@ -25,5 +26,4 @@ class RestartFailed(Addon):
def activate(self):
- self.interval = max(self.MIN_CHECK_INTERVAL, self.get_config('interval') * 60)
- self.init_periodical()
+ self.start_periodical(self.get_config('interval') * 60)