summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/XFileSharingPro.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/XFileSharingPro.py')
-rw-r--r--module/plugins/hoster/XFileSharingPro.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index 8ede709de..c7d8a7761 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class XFileSharingPro(XFSHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
- __version__ = "0.53"
+ __version__ = "0.54"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)'
@@ -24,25 +24,25 @@ class XFileSharingPro(XFSHoster):
def _log(self, level, plugintype, pluginname, messages):
return super(XFileSharingPro, self)._log(level,
plugintype,
- "%s: %s" % (pluginname, self.HOSTER_NAME),
+ "%s: %s" % (pluginname, self.PLUGIN_NAME),
messages)
def init(self):
self.__pattern__ = self.pyload.pluginManager.hosterPlugins[self.__name__]['pattern']
- self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower()
- self.HOSTER_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+|\-)', self.HOSTER_DOMAIN) if part != '.')
+ self.PLUGIN_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower()
+ self.PLUGIN_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+|\-)', self.PLUGIN_DOMAIN) if part != '.')
def _setup(self):
- account_name = self.__name__ if self.account.HOSTER_DOMAIN is None else self.HOSTER_NAME
+ account_name = self.__name__ if self.account.PLUGIN_DOMAIN is None else self.PLUGIN_NAME
self.chunk_limit = 1
self.multiDL = True
if self.account:
- self.req = self.pyload.requestFactory.getRequest(accountname, self.user)
- self.premium = self.account.is_premium(self.user)
+ self.req = self.pyload.requestFactory.getRequest(accountname, self.account.user)
+ self.premium = self.account.premium
self.resume_download = self.premium
else:
self.req = self.pyload.requestFactory.getRequest(account_name)
@@ -55,19 +55,19 @@ class XFileSharingPro(XFSHoster):
self.req.close()
if not self.account:
- self.account = self.pyload.accountManager.getAccountPlugin(self.HOSTER_NAME)
+ self.account = self.pyload.accountManager.getAccountPlugin(self.PLUGIN_NAME)
if not self.account:
self.account = self.pyload.accountManager.getAccountPlugin(self.__name__)
if self.account:
- if not self.account.HOSTER_DOMAIN:
- self.account.HOSTER_DOMAIN = self.HOSTER_DOMAIN
+ if not self.account.PLUGIN_DOMAIN:
+ self.account.PLUGIN_DOMAIN = self.PLUGIN_DOMAIN
- if not self.user:
- self.user = self.account.select()[0]
+ if not self.account.user: #@TODO: Move to `Account` in 0.4.10
+ self.account.user = self.account.select()[0]
- if not self.user or not self.account.is_logged(self.user, True):
+ if not self.account.logged:
self.account = False