diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-03-06 18:30:56 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-03-06 18:30:56 +0100 |
commit | 6aa9ab4f05a9fb5f5fc9cbe1758591cd239ba089 (patch) | |
tree | 89ac1a0553432d7ad3bac56f303c4c346f623dd5 /module | |
parent | [SkipRev] Fix setup loop on download preparing (diff) | |
download | pyload-6aa9ab4f05a9fb5f5fc9cbe1758591cd239ba089.tar.xz |
[SkipRev] Fix https://github.com/pyload/pyload/issues/1217 (2)
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/SkipRev.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index a543ef71c..034d2b803 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +import re + from types import MethodType from urllib import unquote from urlparse import urlparse @@ -18,7 +20,7 @@ def _setup(self): class SkipRev(Hook): __name__ = "SkipRev" __type__ = "hook" - __version__ = "0.27" + __version__ = "0.28" __config__ = [("mode" , "Auto;Manual", "Choose rev files to keep for package", "Auto"), ("tokeep", "int" , "Custom number of files to keep" , 0 )] @@ -35,7 +37,7 @@ class SkipRev(Hook): def _name(self, pyfile): if hasattr(pyfile.pluginmodule, "getInfo"): #@NOTE: getInfo is deprecated in 0.4.10 - return getattr(pyfile.pluginmodule, "getInfo")([pyfile.url]).next()[0] + return pyfile.pluginmodule.getInfo([pyfile.url]).next()[0] else: self.logWarning("Unable to grab file name") return urlparse(unquote(pyfile.url)).path.split('/')[-1] |