From 8edb5481e04da44a227e18c76fc4073297721f4f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Oct 2014 16:29:41 +0200 Subject: [XFileSharingPro] Fixes --- module/plugins/hoster/XFileSharingPro.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 4eb6e95d3..fc348c90f 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -25,12 +25,16 @@ class XFileSharingPro(XFSPHoster): self.HOSTER_NAME = re.match(self.__pattern__, self.pyfile.url).group(1).lower() account_name = "".join([str.capitalize() for str in self.HOSTER_NAME.split('.')]) - self.account = self.core.accountManager.getAccountPlugin(account_name) + account = self.core.accountManager.getAccountPlugin(account_name) - if self.account and self.account.canUse(): - self.user, data = self.account.selectAccount() - self.req = self.account.getAccountRequest(self.user) - self.premium = self.account.isPremium(self.user) + 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: + self.account.HOSTER_NAME = self.HOSTER_NAME def setup(self): -- cgit v1.2.3