summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2013-05-27 16:14:40 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2013-05-27 16:14:40 +0200
commit001d008744577ae916f05194a48663a0931a1955 (patch)
tree3a6e4c074b12a1b9035970fd4885d2d74c651ac9 /module/plugins
parentVersion 0.06: improved filename recognition (big thanks to stickell) (diff)
downloadpyload-001d008744577ae916f05194a48663a0931a1955.tar.xz
Version 0.07: code cosmetics
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/SkipRev.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py
index dccb153d8..561329122 100644
--- a/module/plugins/hooks/SkipRev.py
+++ b/module/plugins/hooks/SkipRev.py
@@ -24,7 +24,7 @@ from re import search
class SkipRev(Hook):
__name__ = "SkipRev"
- __version__ = "0.06"
+ __version__ = "0.07"
__description__ = "Skip download when filename has rev extension"
__config__ = [
("activated", "bool", "Activated", "False"),
@@ -36,10 +36,11 @@ class SkipRev(Hook):
def downloadPreparing(self, pyfile):
# self.logDebug("self.downloadPreparing")
name = basename(pyfile.name)
- if name.endswith(".rev"):
- number = self.getConfig("number")
- part = search(r'\.part(\d+)\.rev$', name)
- if not part or int(part.group(1)) <= number:
- return
- self.logInfo("Skipping " + name)
- pyfile.setStatus("skipped")
+ if not name.endswith(".rev"):
+ return
+ number = self.getConfig("number")
+ part = search(r'\.part(\d+)\.rev$', name)
+ if not part or int(part.group(1)) <= number:
+ return
+ self.logInfo("Skipping " + name)
+ pyfile.setStatus("skipped")