summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-23 18:49:39 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-23 18:49:39 +0100
commitcc833c564e01971b0a915c2f5343ad683c65b825 (patch)
tree9f7908d99c90d38a43d66aa70e06b70b8b848d6f
parent[PremiumizeMe] Fix typo (diff)
downloadpyload-cc833c564e01971b0a915c2f5343ad683c65b825.tar.xz
[LinestorageCom] Fix account plugin
-rw-r--r--module/plugins/accounts/LinestorageCom.py3
-rw-r--r--module/plugins/accounts/XFileSharingPro.py8
-rw-r--r--module/plugins/internal/XFSAccount.py8
3 files changed, 12 insertions, 7 deletions
diff --git a/module/plugins/accounts/LinestorageCom.py b/module/plugins/accounts/LinestorageCom.py
index cf8dd3f3e..a48d5beb9 100644
--- a/module/plugins/accounts/LinestorageCom.py
+++ b/module/plugins/accounts/LinestorageCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class LinestorageCom(XFSAccount):
__name__ = "LinestorageCom"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """Linestorage.com account plugin"""
__license__ = "GPLv3"
@@ -14,3 +14,4 @@ class LinestorageCom(XFSAccount):
HOSTER_DOMAIN = "linestorage.com"
+ HOSTER_URL = "http://linestorage.com/"
diff --git a/module/plugins/accounts/XFileSharingPro.py b/module/plugins/accounts/XFileSharingPro.py
index fb77ab23f..8dc7f3a30 100644
--- a/module/plugins/accounts/XFileSharingPro.py
+++ b/module/plugins/accounts/XFileSharingPro.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class XFileSharingPro(XFSAccount):
__name__ = "XFileSharingPro"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__description__ = """XFileSharingPro multi-purpose account plugin"""
__license__ = "GPLv3"
@@ -27,4 +27,8 @@ class XFileSharingPro(XFSAccount):
def login(self, user, data, req):
if self.HOSTER_DOMAIN:
- return super(XFileSharingPro, self).login(user, data, req)
+ try:
+ return super(XFileSharingPro, self).login(user, data, req)
+ except Exception:
+ self.HOSTER_URL = self.HOSTER_URL.replace("www.", "")
+ return super(XFileSharingPro, self).login(user, data, req)
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index 2094b1480..2784ecd0b 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies
class XFSAccount(Account):
__name__ = "XFSAccount"
__type__ = "account"
- __version__ = "0.32"
+ __version__ = "0.33"
__description__ = """XFileSharing account plugin"""
__license__ = "GPLv3"
@@ -44,11 +44,11 @@ class XFSAccount(Account):
def init(self):
- # if not self.HOSTER_DOMAIN:
- # self.fail(_("Missing HOSTER_DOMAIN"))
+ if not self.HOSTER_DOMAIN:
+ self.logError(_("Missing HOSTER_DOMAIN"))
if not self.HOSTER_URL:
- self.HOSTER_URL = "http://www.%s/" % self.HOSTER_DOMAIN
+ self.HOSTER_URL = "http://www.%s/" % self.HOSTER_DOMAIN or ""
def loadAccountInfo(self, user, req):