diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-11 23:20:32 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-11 23:20:32 +0100 |
commit | e3bdcffc6020322d9f8985c6f6be9476e8c779c9 (patch) | |
tree | 944aec9c30d1b2f2f0eff76cac537e9b50800a72 /module | |
parent | [ExternalScripts] Fixup (diff) | |
download | pyload-e3bdcffc6020322d9f8985c6f6be9476e8c779c9.tar.xz |
[SkipRev] Fix https://github.com/pyload/pyload/issues/1036
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/SkipRev.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index ad6d7dacd..6b4e715da 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -18,7 +18,7 @@ def _setup(self): class SkipRev(Hook): __name__ = "SkipRev" __type__ = "hook" - __version__ = "0.22" + __version__ = "0.23" __config__ = [("tokeep", "int", "Number of rev files to keep for package (-1 to auto)", -1)] @@ -34,7 +34,7 @@ class SkipRev(Hook): def _pyname(self, pyfile): if hasattr(pyfile.pluginmodule, "getInfo"): - return getattr(pyfile.pluginmodule, "getInfo")([pyfile.url])[0][0] + return next(getattr(pyfile.pluginmodule, "getInfo")([pyfile.url]))[0] else: self.logWarning("Unable to grab file name") return urlparse(unquote(pyfile.url)).path.split('/')[-1] diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 5a32ac943..3bdaa5aef 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -115,9 +115,9 @@ def parseFileInfo(plugin, url="", html=""): #@NOTE: Every plugin must have own parseInfos classmethod to work with 0.4.10 def create_getInfo(plugin): if hasattr(plugin, "parseInfos"): - fn = lambda urls: [(info['name'], info['size'], info['status'], info['url']) for info in plugin.parseInfos(urls)] + fn = lambda urls: map(yield, (info['name'], info['size'], info['status'], info['url']) for info in plugin.parseInfos(urls)) else: - fn = lambda urls: [parseFileInfo(url) for url in urls] + fn = lambda urls: map(yield, parseFileInfo(url) for url in urls) return fn @@ -183,7 +183,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "0.94" + __version__ = "0.95" __pattern__ = r'^unmatchable$' |