diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-23 01:30:45 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-23 01:30:45 +0100 |
commit | 9804b57e02d663328af048a96e60a330ac27b60d (patch) | |
tree | bd71d62e8a3ea37154e36eb75ed72bb0cc4982b2 /module/plugins/internal/DeadHoster.py | |
parent | [BasePlugin] Improve a bit (diff) | |
download | pyload-9804b57e02d663328af048a96e60a330ac27b60d.tar.xz |
Fixes about create_getInfo
Diffstat (limited to 'module/plugins/internal/DeadHoster.py')
-rw-r--r-- | module/plugins/internal/DeadHoster.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py index b78068069..b85aea3f9 100644 --- a/module/plugins/internal/DeadHoster.py +++ b/module/plugins/internal/DeadHoster.py @@ -1,20 +1,15 @@ # -*- coding: utf-8 -*- -from module.plugins.Hoster import Hoster as _Hoster - - -def create_getInfo(plugin): +from urlparse import urlparse - def getInfo(urls): - yield map(lambda url: ('#N/A: ' + url, 0, 1, url), urls) - - return getInfo +from module.plugins.internal.SimpleHoster import create_getInfo +from module.plugins.Hoster import Hoster as _Hoster class DeadHoster(_Hoster): __name__ = "DeadHoster" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'^unmatchable$' @@ -23,6 +18,14 @@ class DeadHoster(_Hoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + @classmethod + def getInfo(cls, url="", html=""): + return {'name': urlparse(url).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 1, 'url': url or ""} + + def setup(self): self.pyfile.error = "Hoster is no longer available" self.offline() #@TODO: self.offline("Hoster is no longer available") + + +getInfo = create_getInfo(DeadHoster) |