summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-16 03:44:15 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-16 03:44:15 +0100
commit3d27f5ccee412d38102873a5b02e3f236375eb97 (patch)
treec8d782ccfe267301b8239d5f75e471cdcae7faa2 /module/plugins/hooks
parentMerge branch 'pr/n959_philou75' into stable (diff)
downloadpyload-3d27f5ccee412d38102873a5b02e3f236375eb97.tar.xz
Update plugins (2)
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/RestartSlow.py4
-rw-r--r--module/plugins/hooks/SkipRev.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/RestartSlow.py b/module/plugins/hooks/RestartSlow.py
index 587799235..c2fdf6f95 100644
--- a/module/plugins/hooks/RestartSlow.py
+++ b/module/plugins/hooks/RestartSlow.py
@@ -8,7 +8,7 @@ from module.plugins.Hook import Hook
class RestartSlow(Hook):
__name__ = "RestartSlow"
__type__ = "hook"
- __version__ = "0.02"
+ __version__ = "0.03"
__config__ = [("free_limit" , "int" , "Transfer speed threshold in kilobytes" , 100 ),
("free_time" , "int" , "Sample interval in minutes" , 5 ),
@@ -45,7 +45,7 @@ class RestartSlow(Hook):
limit = max(5, self.getConfig("%s_limit" % type) * 1024)
chunks = [chunk for chunk in self.pyfile.req.dl.chunks \
- if chunk.id not in self.info['chunk'] or self.info['chunk'][chunk.id] not is (time, limit)]
+ if chunk.id not in self.info['chunk'] or self.info['chunk'][chunk.id] is not (time, limit)]
for chunk in chunks:
chunk.c.setopt(pycurl.LOW_SPEED_TIME , time)
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py
index 107740a3d..d21aa0f6d 100644
--- a/module/plugins/hooks/SkipRev.py
+++ b/module/plugins/hooks/SkipRev.py
@@ -10,7 +10,7 @@ from module.plugins.Plugin import SkipDownload
class SkipRev(Hook):
__name__ = "SkipRev"
__type__ = "hook"
- __version__ = "0.15"
+ __version__ = "0.16"
__config__ = [("tokeep", "int", "Number of rev files to keep for package (-1 to auto)", -1)]
@@ -45,13 +45,13 @@ class SkipRev(Hook):
else:
self.logWarning("Unable to grab file name")
- name = urlparse(unquote(url)).path.split('/')[-1])
+ name = urlparse(unquote(url)).path.split('/')[-1]
return name
def downloadPreparing(self, pyfile):
- if pyfile.getStatusName() is "unskipped" or not pyname(pyfile).endswith(".rev"):
+ if pyfile.getStatusName() is "unskipped" or not self.pyname(pyfile).endswith(".rev"):
return
tokeep = self.getConfig("tokeep")