summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/DeleteFinished.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/DeleteFinished.py')
-rw-r--r--module/plugins/hooks/DeleteFinished.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/hooks/DeleteFinished.py b/module/plugins/hooks/DeleteFinished.py
index 4c29d5fdf..e72439c0a 100644
--- a/module/plugins/hooks/DeleteFinished.py
+++ b/module/plugins/hooks/DeleteFinished.py
@@ -7,10 +7,11 @@ from module.plugins.internal.Addon import Addon
class DeleteFinished(Addon):
__name__ = "DeleteFinished"
__type__ = "hook"
- __version__ = "1.15"
+ __version__ = "1.16"
__status__ = "testing"
- __config__ = [("interval" , "int" , "Check interval in hours" , 72 ),
+ __config__ = [("activated" , "bool", "Activated" , False),
+ ("interval" , "int" , "Check interval in hours" , 72 ),
("deloffline", "bool", "Delete package with offline links", False)]
__description__ = """Automatically delete all finished packages from queue"""
@@ -18,12 +19,11 @@ class DeleteFinished(Addon):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- MIN_CHECK_INTERVAL = 1 * 60 * 60 #: 1 hour
+ PERIODICAL_INTERVAL = 1 * 60 * 60 #: 1 hour
def activate(self):
- self.interval = self.MIN_CHECK_INTERVAL
- self.init_periodical()
+ self.start_periodical()
def periodical(self):
@@ -43,7 +43,7 @@ class DeleteFinished(Addon):
def activate(self):
self.info['sleep'] = True
- self.interval = max(self.MIN_CHECK_INTERVAL, self.get_config('interval') * 60 * 60)
+ self.interval = max(self.PERIODICAL_INTERVAL, self.get_config('interval') * 60 * 60)
self.add_event('package_finished', self.wakeup)