summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/XFileSharingPro.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-30 17:18:31 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-30 17:25:10 +0100
commit2719f47c583056d108129642e84cd943a2889a3b (patch)
tree98a8a84d913fa6387fa2cd7742a16ca646c4b2aa /module/plugins/hoster/XFileSharingPro.py
parent[File4safeCom] Removed, use XFileSharingPro instead (diff)
downloadpyload-2719f47c583056d108129642e84cd943a2889a3b.tar.xz
[XFileSharingPro] Fix hoster pairing with account
Diffstat (limited to 'module/plugins/hoster/XFileSharingPro.py')
-rw-r--r--module/plugins/hoster/XFileSharingPro.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index 562a0f1f5..0ac2e97bd 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo
class XFileSharingPro(XFSPHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
- __version__ = "0.39"
+ __version__ = "0.40"
__pattern__ = r'^unmatchable$'
@@ -21,6 +21,8 @@ class XFileSharingPro(XFSPHoster):
def init(self):
+ self.file_info = {}
+
self.__pattern__ = self.core.pluginManager.hosterPlugins[self.__name__]['pattern']
self.HOSTER_NAME = re.match(self.__pattern__, self.pyfile.url).group(1).lower()
@@ -28,13 +30,15 @@ class XFileSharingPro(XFSPHoster):
account = self.core.accountManager.getAccountPlugin(account_name)
if account and account.canUse():
- self.user, data = account.selectAccount()
- self.req = account.getAccountRequest(self.user)
- self.premium = account.isPremium(self.user)
-
self.account = account
- else:
+ elif self.account:
self.account.HOSTER_NAME = self.HOSTER_NAME
+ else:
+ return
+
+ self.user, data = self.account.selectAccount()
+ self.req = self.account.getAccountRequest(self.user)
+ self.premium = self.account.isPremium(self.user)
def setup(self):