diff options
Diffstat (limited to 'pyload/plugin/internal/BasePlugin.py')
-rw-r--r-- | pyload/plugin/internal/BasePlugin.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py index 0b6e8f102..7c83ddef0 100644 --- a/pyload/plugin/internal/BasePlugin.py +++ b/pyload/plugin/internal/BasePlugin.py @@ -13,7 +13,7 @@ from pyload.plugin.Hoster import Hoster class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.41" __pattern__ = r'^unmatchable$' @@ -41,6 +41,16 @@ class BasePlugin(Hoster): self.resumeDownload = True + #: Work-around to `filename*=UTF-8` bug; remove in 0.4.10 + def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=False): + try: + if disposition: + content = urllib2.urlopen(url).info()['Content-Disposition'].split(';') + self.pyfile.name = content[1].split('filename=')[1][1:-1] or self.pyfile.name + finally: + return super(BasePlugin, self).download(url, get, post, ref, cookies, False) + + def process(self, pyfile): """main function""" |