summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/internal
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/internal')
-rw-r--r--pyload/plugin/internal/BasePlugin.py10
-rw-r--r--pyload/plugin/internal/SimpleHoster.py14
-rw-r--r--pyload/plugin/internal/XFSHoster.py4
3 files changed, 9 insertions, 19 deletions
diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py
index 7c83ddef0..a0745f99a 100644
--- a/pyload/plugin/internal/BasePlugin.py
+++ b/pyload/plugin/internal/BasePlugin.py
@@ -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][1:-1] 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/pyload/plugin/internal/SimpleHoster.py b/pyload/plugin/internal/SimpleHoster.py
index 56170a4fd..fa48f1e25 100644
--- a/pyload/plugin/internal/SimpleHoster.py
+++ b/pyload/plugin/internal/SimpleHoster.py
@@ -307,7 +307,7 @@ class SimpleHoster(Hoster):
LOGIN_ACCOUNT = False #: Set to True to require account login
DISPOSITION = True #: Set to True to use any content-disposition value in http header as file name
- directLink = getFileURL # @TODO: Remove in 0.4.10
+ directLink = getFileURL #@TODO: Remove in 0.4.10
@classmethod
@@ -410,13 +410,13 @@ class SimpleHoster(Hoster):
self.resumeDownload = self.multiDL = self.premium
def prepare(self):
- self.pyfile.error = "" # @TODO: Remove in 0.4.10
+ self.pyfile.error = "" #@TODO: Remove in 0.4.10
self.info = {}
self.html = ""
- self.link = "" # @TODO: Move to hoster class in 0.4.10
- self.directDL = False # @TODO: Move to hoster class in 0.4.10
- self.multihost = False # @TODO: Move to hoster class in 0.4.10
+ self.link = "" #@TODO: Move to hoster class in 0.4.10
+ self.directDL = False #@TODO: Move to hoster class in 0.4.10
+ self.multihost = False #@TODO: Move to hoster class in 0.4.10
if not self.getConfig('use_premium', True):
self.retryFree()
@@ -480,7 +480,7 @@ class SimpleHoster(Hoster):
self.downloadLink(self.link, self.DISPOSITION)
self.checkFile()
- except Fail, e: # @TODO: Move to PluginThread in 0.4.10
+ except Fail, e: #@TODO: Move to PluginThread in 0.4.10
if self.premium:
self.logWarning(_("Premium download failed"))
self.retryFree()
@@ -711,7 +711,7 @@ class SimpleHoster(Hoster):
self.logInfo(_("Filesize: %i KiB, Traffic left for user %s: %i KiB") % (size, self.user, traffic))
return size <= traffic
- def getConfig(self, option, default=''): # @TODO: Remove in 0.4.10
+ def getConfig(self, option, default=''): #@TODO: Remove in 0.4.10
"""getConfig with default value - sublass may not implements all config options"""
try:
return self.getConf(option)
diff --git a/pyload/plugin/internal/XFSHoster.py b/pyload/plugin/internal/XFSHoster.py
index 0e265ce64..db2d2e1d0 100644
--- a/pyload/plugin/internal/XFSHoster.py
+++ b/pyload/plugin/internal/XFSHoster.py
@@ -29,7 +29,7 @@ class XFSHoster(SimpleHoster):
TEXT_ENCODING = False
DIRECT_LINK = None
- MULTI_HOSTER = True # @NOTE: Should be default to False for safe, but I'm lazy...
+ MULTI_HOSTER = True #@NOTE: Should be default to False for safe, but I'm lazy...
NAME_PATTERN = r'(Filename[ ]*:[ ]*</b>(</td><td nowrap>)?|name="fname"[ ]+value="|<[\w^_]+ class="(file)?name">)\s*(?P<N>.+?)(\s*<|")'
SIZE_PATTERN = r'(Size[ ]*:[ ]*</b>(</td><td>)?|File:.*>|</font>\s*\(|<[\w^_]+ class="size">)\s*(?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)'
@@ -109,7 +109,7 @@ class XFSHoster(SimpleHoster):
self.logError(data['op'] if 'op' in data else _("UNKNOWN"))
return ""
- self.link = m.group(1).strip() # @TODO: Remove .strip() in 0.4.10
+ self.link = m.group(1).strip() #@TODO: Remove .strip() in 0.4.10
def handlePremium(self, pyfile):
return self.handleFree(pyfile)