diff options
Diffstat (limited to 'module')
| -rw-r--r-- | module/plugins/hoster/BasePlugin.py | 12 | ||||
| -rw-r--r-- | module/plugins/hoster/Ftp.py | 12 | ||||
| -rw-r--r-- | module/plugins/internal/SimpleHoster.py | 15 | 
3 files changed, 3 insertions, 36 deletions
| diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 28a916fe8..962c8887b 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.42" +    __version__ = "0.43"      __pattern__ = r'^unmatchable$' @@ -41,16 +41,6 @@ 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].strip('"\'') or self.pyfile.name -        finally: -            return super(BasePlugin, self).download(url, get, post, ref, cookies, False) - -      def process(self, pyfile):          """main function""" diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index 546845ca0..5be380078 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -12,7 +12,7 @@ from module.plugins.Hoster import Hoster  class Ftp(Hoster):      __name__    = "Ftp"      __type__    = "hoster" -    __version__ = "0.50" +    __version__ = "0.51"      __pattern__ = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+' @@ -28,16 +28,6 @@ class Ftp(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].strip('"\'') or self.pyfile.name -        finally: -            return super(Ftp, self).download(url, get, post, ref, cookies, False) - -      def process(self, pyfile):          parsed_url = urlparse(pyfile.url)          netloc = parsed_url.netloc diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 0bc529cbe..df3d66ea2 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -6,7 +6,6 @@ import os  import re  import time  import urllib -import urllib2  import urlparse  from module.PyFile import statusMap as _statusMap @@ -245,7 +244,7 @@ def secondsToMidnight(gmt=0):  class SimpleHoster(Hoster):      __name__    = "SimpleHoster"      __type__    = "hoster" -    __version__ = "1.39" +    __version__ = "1.40"      __pattern__ = r'^unmatchable$'      __config__  = [("use_premium", "bool", "Use premium account if available", True)] @@ -496,18 +495,6 @@ class SimpleHoster(Hoster):                  raise Fail(e) -    #@NOTE: 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].strip('"\'') -                                    or urlparse.urlparse(urllib.unquote(url)).path.split('/')[-1] -                                    or self.pyfile.name) -        finally: -            return super(SimpleHoster, self).download(url, get, post, ref, cookies, False) - -      def downloadLink(self, link, disposition=True):          if link and isinstance(link, basestring):              self.correctCaptcha() | 
