summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/BasePlugin.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-31 23:58:33 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-31 23:58:33 +0200
commitfcaf6c9e4c5c618b8c2741ca7ee5676787b4c3f0 (patch)
tree4f325a9b18d2a5a7d8670c068c7bae1977be6d5d /module/plugins/hoster/BasePlugin.py
parent[TusfilesNet] Fix downloadLink (diff)
downloadpyload-fcaf6c9e4c5c618b8c2741ca7ee5676787b4c3f0.tar.xz
Temp fixup to `filename*=UTF-8` bug
Diffstat (limited to 'module/plugins/hoster/BasePlugin.py')
-rw-r--r--module/plugins/hoster/BasePlugin.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index bd73a72b0..8da7ff5df 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.38"
+ __version__ = "0.39"
__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(self.link).info()['Content-Disposition'].split(';')
+ self.pyfile.name = content[1].split('filename=')[1][1:-1]
+ finally:
+ return super(SimpleHoster, self).download(url, get, post, ref, cookies, False)
+
+
def process(self, pyfile):
"""main function"""