diff options
author | 2015-10-01 23:21:14 +0200 | |
---|---|---|
committer | 2015-10-01 23:21:14 +0200 | |
commit | ab3c90a7b0d18f47d3efc8259906895c1f50765d (patch) | |
tree | ec3cde40c03e1c771d026ba2d4917f4229a31dcc /module/plugins/internal/Base.py | |
parent | Merge pull request #1902 from GammaC0de/patch-3 (diff) | |
download | pyload-ab3c90a7b0d18f47d3efc8259906895c1f50765d.tar.xz |
Fixpack (1)
Diffstat (limited to 'module/plugins/internal/Base.py')
-rw-r--r-- | module/plugins/internal/Base.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/module/plugins/internal/Base.py b/module/plugins/internal/Base.py index 4235cf94d..843d2ad11 100644 --- a/module/plugins/internal/Base.py +++ b/module/plugins/internal/Base.py @@ -19,11 +19,21 @@ def getInfo(urls): #@TODO: Remove in 0.4.10 +def parse_fileInfo(klass, url="", html=""): + info = klass.get_info(url, html) + return encode(info['name']), info['size'], info['status'], info['url'] + + +#@TODO: Remove in 0.4.10 def create_getInfo(klass): def get_info(urls): for url in urls: - if hasattr(klass, "URL_REPLACEMENTS"): + try: url = replace_patterns(url, klass.URL_REPLACEMENTS) + + except Exception: + pass + yield parse_fileInfo(klass, url) return get_info @@ -42,7 +52,7 @@ def check_abort(fn): class Base(Plugin): __name__ = "Base" __type__ = "base" - __version__ = "0.01" + __version__ = "0.02" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -366,7 +376,7 @@ class Base(Plugin): @check_abort def load(self, *args, **kwargs): - return super(Hoster, self).load(*args, **kwargs) + return super(Base, self).load(*args, **kwargs) def check_abort(self): |