summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Jens Hörnlein <jens.hoernlein@googlemail.com> 2015-02-05 00:26:25 +0100
committerGravatar Jens Hörnlein <jens.hoernlein@googlemail.com> 2015-02-05 00:26:25 +0100
commiteac9718c284330ca759d09661b98e070351d80ae (patch)
tree014ef6087ec6d217807f12a0658501952fc78456 /module/plugins
parent[GoogledriveCom] Cleanup (diff)
downloadpyload-eac9718c284330ca759d09661b98e070351d80ae.tar.xz
[RestartSlow] Fixed AttributeError
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/RestartSlow.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/hooks/RestartSlow.py b/module/plugins/hooks/RestartSlow.py
index c2fdf6f95..9a0b43b1a 100644
--- a/module/plugins/hooks/RestartSlow.py
+++ b/module/plugins/hooks/RestartSlow.py
@@ -33,7 +33,7 @@ class RestartSlow(Hook):
def periodical(self):
- if not self.pyfile.req.dl:
+ if not self.pyfile.plugin.req.dl:
return
if self.getConfig("safe_mode") and not self.pyfile.plugin.resumeDownload:
@@ -44,7 +44,7 @@ class RestartSlow(Hook):
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.req.dl.chunks \
+ 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)]
for chunk in chunks:
@@ -57,5 +57,5 @@ class RestartSlow(Hook):
def downloadStarts(self, pyfile, url, filename):
if self.cb or (self.getConfig("safe_mode") and not pyfile.plugin.resumeDownload):
return
-
+ self.pyfile = pyfile
super(RestartSlow, self).initPeriodical()