diff options
author | 2015-03-26 18:15:41 +0100 | |
---|---|---|
committer | 2015-03-26 18:15:41 +0100 | |
commit | 181ab47c5f775b8b48569361da6b88a801784a30 (patch) | |
tree | f5f6d1d6b75b7f21b89b33733c3536e5ca80e087 /pyload/plugin/addon/RestartSlow.py | |
parent | Merge branch 'stable' into 0.4.10 (diff) | |
download | pyload-181ab47c5f775b8b48569361da6b88a801784a30.tar.xz |
Cleanup
Diffstat (limited to 'pyload/plugin/addon/RestartSlow.py')
-rw-r--r-- | pyload/plugin/addon/RestartSlow.py | 7 |
1 files changed, 4 insertions, 3 deletions
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)] |