From 6aa9ab4f05a9fb5f5fc9cbe1758591cd239ba089 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 6 Mar 2015 18:30:56 +0100 Subject: [SkipRev] Fix https://github.com/pyload/pyload/issues/1217 (2) --- module/plugins/hooks/SkipRev.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks/SkipRev.py') 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] -- cgit v1.2.3