From 181ab47c5f775b8b48569361da6b88a801784a30 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 26 Mar 2015 18:15:41 +0100 Subject: Cleanup --- pyload/plugin/addon/RestartSlow.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pyload/plugin/addon/RestartSlow.py') diff --git a/pyload/plugin/addon/RestartSlow.py b/pyload/plugin/addon/RestartSlow.py index cd503518d..34416e79a 100644 --- a/pyload/plugin/addon/RestartSlow.py +++ b/pyload/plugin/addon/RestartSlow.py @@ -22,11 +22,12 @@ class RestartSlow(Addon): event_list = ["downloadStarts"] - interval = 0 #@TODO: Remove in 0.4.10 def setup(self): self.info = {'chunk': {}} + + def periodical(self): if not self.pyfile.plugin.req.dl: return @@ -36,8 +37,8 @@ class RestartSlow(Addon): limit = 5 else: type = "premium" if self.pyfile.plugin.premium else "free" - time = max(30, self.getConfig("%s_time" % type) * 60) - limit = max(5, self.getConfig("%s_limit" % type) * 1024) + time = max(30, self.getConfig('%s_time' % type) * 60) + limit = max(5, self.getConfig('%s_limit' % type) * 1024) chunks = [chunk for chunk in self.pyfile.plugin.req.dl.chunks \ if chunk.id not in self.info['chunk'] or self.info['chunk'][chunk.id] is not (time, limit)] -- cgit v1.2.3