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/accounts/XFileSharingPro.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/XFileSharingPro.py b/module/plugins/accounts/XFileSharingPro.py index d5a62c3a4..5be377c40 100644 --- a/module/plugins/accounts/XFileSharingPro.py +++ b/module/plugins/accounts/XFileSharingPro.py @@ -10,11 +10,21 @@ class XFileSharingPro(XFSPAccount): __type__ = "account" __version__ = "0.02" - __description__ = """XFileSharingPro multi-purpose account plugin""" + __description__ = """XFileSharingPro dummy account plugin""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - def init(self): - pattern = self.core.pluginManager.hosterPlugins[self.__name__]['pattern'] - self.HOSTER_NAME = re.match(pattern, self.pyfile.url).group(1).lower() + HOSTER_NAME = None + + + def loadAccountInfo(self, user, req): + if self.HOSTER_NAME: + return super(XFileSharingPro, self).loadAccountInfo(user, req) + else: + return {'validuntil': None, 'trafficleft': None, 'premium': None} + + + def login(self, user, data, req): + if self.HOSTER_NAME: + return super(XFileSharingPro, self).login(user, data, req) -- cgit v1.2.3