diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-07 22:19:51 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-07 22:19:51 +0100 |
commit | 04f45a93919ab9c019c5d5a06926a4f40f5ae47a (patch) | |
tree | 05430305a0e42b1a9266ff650cda9c7bd2a4a4c3 | |
parent | Merge pull request #1142 from zapp-brannigan/patch-1 (diff) | |
parent | [RestartSlow] Fixed AttributeError (diff) | |
download | pyload-04f45a93919ab9c019c5d5a06926a4f40f5ae47a.tar.xz |
Merge pull request #1144 from immenz/dev_restartslow
[RestartSlow] Fixed AttributeError
-rw-r--r-- | module/plugins/hooks/RestartSlow.py | 6 |
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() |