diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 16:01:38 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-10 16:01:38 +0100 |
commit | 502c1437e838282aa56a286bb3751382c3aaf65e (patch) | |
tree | 088f89ac569dc928e8c478bf4163a2595b6b0510 /module/plugins/hoster | |
parent | [MultiHoster] Fix filename recognition (diff) | |
download | pyload-502c1437e838282aa56a286bb3751382c3aaf65e.tar.xz |
Improve getInfo
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index c2825493b..6d3132e65 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -13,7 +13,7 @@ from module.plugins.Hoster import Hoster class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.29" + __version__ = "0.30" __pattern__ = r'^unmatchable$' @@ -25,7 +25,13 @@ class BasePlugin(Hoster): @classmethod def getInfo(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10 - return {'name': urlparse(unquote(url)).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 3 if url else 1, 'url': unquote(url) or ""} + url = unquote(url) + return {'name' : (urlparse(url).path.split('/')[-1] + or urlparse(url).query.split('=', 1)[::-1][0].split('&', 1)[0] + or _("Unknown")), + 'size' : 0, + 'status': 3 if url else 8, + 'url' : url} def setup(self): |