diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/SkipRev.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index 0ac8de412..ce57fe4b5 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -22,7 +22,7 @@ from module.plugins.Hook import Hook class SkipRev(Hook): __name__ = "SkipRev" - __version__ = "0.02" + __version__ = "0.03" __description__ = "Skip download when filename has rev extension" __config__ = [ ("activated", "bool", "Activated", "False"), @@ -34,10 +34,10 @@ class SkipRev(Hook): def downloadPreparing(self, pyfile): # self.logDebug("self.downloadPreparing") name = basename(pyfile.name) - number = self.getConfig("number") - if name.find(".rev") != -1: - for i in range(1, number): - if name.find(i + ".rev") != -1: + max = self.getConfig("number") + if name.endswith(".rev"): + for n in range(1, max): + if name.endswith(n + ".rev"): return self.logInfo("Skipping " + name) pyfile.setStatus("skipped") |