summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/XFSAccount.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/XFSAccount.py')
-rw-r--r--module/plugins/internal/XFSAccount.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index e3290b5bb..94dabaed8 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -4,17 +4,22 @@ import re
import time
import urlparse
-from module.plugins.internal.Account import Account
-# from module.plugins.internal.MultiAccount import MultiAccount
-from module.plugins.internal.Plugin import parse_html_form, parse_time, set_cookie
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import parse_html_form, parse_time, set_cookie
-class XFSAccount(Account):
+class XFSAccount(MultiAccount):
__name__ = "XFSAccount"
__type__ = "account"
__version__ = "0.53"
__status__ = "testing"
+ __config__ = [("activated" , "bool" , "Activated" , True ),
+ ("multi" , "bool" , "Multi-hoster" , True ),
+ ("multi_mode" , "all;listed;unlisted", "Hosters to use" , "all"),
+ ("multi_list" , "str" , "Hoster list (comma separated)", "" ),
+ ("multi_interval", "int" , "Reload interval in hours" , 12 )]
+
__description__ = """XFileSharing account plugin"""
__license__ = "GPLv3"
__authors__ = [("zoidberg" , "zoidberg@mujmail.cz"),
@@ -44,7 +49,7 @@ class XFSAccount(Account):
def set_xfs_cookie(self):
if not self.PLUGIN_DOMAIN:
- self.log_error(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
+ self.log_warning(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
return
cookie = (self.PLUGIN_DOMAIN, "lang", "english")
@@ -55,6 +60,10 @@ class XFSAccount(Account):
set_cookie(self.req.cj, *cookie)
+ def grab_hosters(self, user, password, data):
+ pass
+
+
def grab_info(self, user, password, data):
validuntil = None
trafficleft = None