summaryrefslogtreecommitdiffstats
path: root/pyload/plugins
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-08-24 20:15:18 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-09-07 20:27:26 +0200
commit8f0eb5ab7160ad71a232c5acf52c64687a9636db (patch)
tree64a0ba6735dc95d2e71108d461155267312bf6d5 /pyload/plugins
parentRealdebrid: fixed #208 (diff)
downloadpyload-8f0eb5ab7160ad71a232c5acf52c64687a9636db.tar.xz
XFileSharingPro: fixed a premium direct links issue.
(cherry picked from commit cbb3d4c6a590f848f94b34faf19bef849e39e13a)
Diffstat (limited to 'pyload/plugins')
-rw-r--r--pyload/plugins/hoster/XFileSharingPro.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/pyload/plugins/hoster/XFileSharingPro.py b/pyload/plugins/hoster/XFileSharingPro.py
index 9df843678..ec093d28d 100644
--- a/pyload/plugins/hoster/XFileSharingPro.py
+++ b/pyload/plugins/hoster/XFileSharingPro.py
@@ -35,7 +35,7 @@ class XFileSharingPro(SimpleHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
__pattern__ = r"^unmatchable$"
- __version__ = "0.18"
+ __version__ = "0.19"
__description__ = """XFileSharingPro common hoster base"""
__author_name__ = ("zoidberg", "stickell")
__author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
@@ -73,18 +73,21 @@ class XFileSharingPro(SimpleHoster):
else:
self.fail("Only premium users can download from other hosters with %s" % self.HOSTER_NAME)
else:
- try:
- self.html = self.load(pyfile.url, cookies=False, decode=True)
- self.file_info = self.getFileInfo()
- except PluginParseError:
- self.file_info = None
-
self.location = self.getDirectDownloadLink()
if not self.file_info:
pyfile.name = html_unescape(unquote(urlparse(
self.location if self.location else pyfile.url).path.split("/")[-1]))
+ # self.load will fail because pyfile.url is a direct link to the download if self.location
+ # is set so it will be executed only if pyfile.url is not a direct link (location not set).
+ if not self.location:
+ try:
+ self.html = self.load(pyfile.url, cookies=False, decode=True)
+ self.file_info = self.getFileInfo()
+ except PluginParseError:
+ self.file_info = None
+
if self.location:
self.startDownload(self.location)
elif self.premium: