summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/XFileSharingProFolder.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/XFileSharingProFolder.py')
-rw-r--r--module/plugins/crypter/XFileSharingProFolder.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py
new file mode 100644
index 000000000..e6fb2a7a5
--- /dev/null
+++ b/module/plugins/crypter/XFileSharingProFolder.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from module.plugins.internal.XFSPCrypter import XFSPCrypter
+
+
+class XFileSharingProFolder(XFSPCrypter):
+ __name__ = "XFileSharingProFolder"
+ __type__ = "crypter"
+ __version__ = "0.02"
+
+ __pattern__ = r'^unmatchable$'
+
+ __description__ = """XFileSharingPro dummy folder decrypter plugin for hook"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ def init(self):
+ self.__pattern__ = self.core.pluginManager.crypterPlugins[self.__name__]['pattern']
+ 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('.')])
+ 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:
+ self.account.HOSTER_NAME = self.HOSTER_NAME