diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-11 01:04:09 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-11 01:04:09 +0200 |
commit | c3b3f3ea5c813edbe3e6941c535c78ad494244ee (patch) | |
tree | 6a76a01cdf3d5fe678e02618bdbe7d0c5ce8ca8c /module/plugins/hoster/XFileSharingPro.py | |
parent | Fix https://github.com/pyload/pyload/issues/2002 (diff) | |
download | pyload-c3b3f3ea5c813edbe3e6941c535c78ad494244ee.tar.xz |
Fix https://github.com/pyload/pyload/issues/1998
Fix https://github.com/pyload/pyload/issues/1999
Fix https://github.com/pyload/pyload/issues/2001
Diffstat (limited to 'module/plugins/hoster/XFileSharingPro.py')
-rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 9b4c9aeb3..e202d23dd 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -6,12 +6,13 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class XFileSharingPro(XFSHoster): - __name = "XFileSharingPro" + __name__ = "XFileSharingPro" __type__ = "hoster" __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|$)' + __config__ = [("activated", "bool", "Activated", True)] __description__ = """XFileSharingPro dummy hoster plugin for hook""" __license__ = "GPLv3" @@ -29,14 +30,14 @@ class XFileSharingPro(XFSHoster): def init(self): - self.__pattern = self.pyload.pluginManager.hosterPlugins[self.__name__]['pattern'] + self.__pattern__ = self.pyload.pluginManager.hosterPlugins[self.classname]['pattern'] - self.PLUGIN_DOMAIN = re.match(self.__pattern, self.pyfile.url).group("DOMAIN").lower() + 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.PLUGIN_DOMAIN is None else self.PLUGIN_NAME + account_name = self.classname if self.account.PLUGIN_DOMAIN is None else self.PLUGIN_NAME self.chunk_limit = 1 self.multiDL = True @@ -58,7 +59,7 @@ class XFileSharingPro(XFSHoster): self.account = self.pyload.accountManager.getAccountPlugin(self.PLUGIN_NAME) if not self.account: - self.account = self.pyload.accountManager.getAccountPlugin(self.__name__) + self.account = self.pyload.accountManager.getAccountPlugin(self.classname) if self.account: if not self.account.PLUGIN_DOMAIN: |