summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-25 00:27:21 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-25 00:27:21 +0100
commitbe322927f8bedbe86e801326651bd548eeda1dd3 (patch)
treef7eccca505cc96c983b66bb963b85d2c52159020 /module
parentFree XFS Premium chunked downloads. (diff)
downloadpyload-be322927f8bedbe86e801326651bd548eeda1dd3.tar.xz
[BasePlugin] Fix https://github.com/pyload/pyload/issues/1073
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/BasePlugin.py5
-rw-r--r--module/plugins/internal/SimpleHoster.py6
-rw-r--r--module/plugins/internal/XFSHoster.py14
3 files changed, 15 insertions, 10 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 172b8899c..4f9e25a35 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.32"
+ __version__ = "0.33"
__pattern__ = r'^unmatchable$'
@@ -36,6 +36,7 @@ class BasePlugin(Hoster):
def setup(self):
self.chunkLimit = -1
+ self.multiDL = True
self.resumeDownload = True
@@ -52,7 +53,7 @@ class BasePlugin(Hoster):
link = fileUrl(self, unquote(pyfile.url))
if link:
- self.download(link, disposition=True)
+ self.download(link, ref=False, disposition=True)
else:
self.fail(_("File not found"))
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 506974259..5c9d993e7 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -245,7 +245,7 @@ def secondsToMidnight(gmt=0):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.09"
+ __version__ = "1.10"
__pattern__ = r'^unmatchable$'
@@ -492,7 +492,7 @@ class SimpleHoster(Hoster):
self.checkFile()
- def downloadLink(self, link, disposition=False):
+ def downloadLink(self, link, disposition=False): #@TODO: Set `disposition=True` in 0.4.10
if link and isinstance(link, basestring):
self.correctCaptcha()
@@ -501,7 +501,7 @@ class SimpleHoster(Hoster):
baseurl = "%s://%s" % (url_p.scheme, url_p.netloc)
link = urljoin(baseurl, link)
- self.download(link, disposition=disposition) #@TODO: Set `disposition=True` in 0.4.10
+ self.download(link, ref=False, disposition=disposition)
def checkFile(self):
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index c6ec5faff..fbbb37b37 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -15,7 +15,7 @@ from module.utils import html_unescape
class XFSHoster(SimpleHoster):
__name__ = "XFSHoster"
__type__ = "hoster"
- __version__ = "0.39"
+ __version__ = "0.40"
__pattern__ = r'^unmatchable$'
@@ -88,12 +88,16 @@ class XFSHoster(SimpleHoster):
self.directDL = self.premium
- def downloadLink(self, link):
+ def downloadLink(self, link, disposition=False): #@TODO: Set `disposition=True` in 0.4.10
if link and isinstance(link, basestring):
- if self.captcha:
- self.correctCaptcha()
+ self.correctCaptcha()
- self.download(link, ref=True, cookies=True, disposition=False) #@TODO: Set `disposition=True` in 0.4.10
+ if not urlparse(link).scheme:
+ url_p = urlparse(self.pyfile.url)
+ baseurl = "%s://%s" % (url_p.scheme, url_p.netloc)
+ link = urljoin(baseurl, link)
+
+ self.download(link, ref=False, disposition=disposition)
elif self.errmsg:
if 'captcha' in self.errmsg: