diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
commit | 43e6a6376625ac73067403ddae3b45a80618d6c8 (patch) | |
tree | ceb458c3da1f19e0a91731bc254ee3a158682d0b /pyload/plugins/accounts/BayfilesCom.py | |
parent | [ConfigParser] Remove IGNORE feature (diff) | |
download | pyload-43e6a6376625ac73067403ddae3b45a80618d6c8.tar.xz |
Rename accounts directory to account
Diffstat (limited to 'pyload/plugins/accounts/BayfilesCom.py')
-rw-r--r-- | pyload/plugins/accounts/BayfilesCom.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/pyload/plugins/accounts/BayfilesCom.py b/pyload/plugins/accounts/BayfilesCom.py deleted file mode 100644 index 221d1615d..000000000 --- a/pyload/plugins/accounts/BayfilesCom.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import time - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class BayfilesCom(Account): - __name__ = "BayfilesCom" - __type__ = "account" - __version__ = "0.03" - - __description__ = """Bayfiles.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - - def loadAccountInfo(self, user, req): - for _ in xrange(2): - response = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) - self.logDebug(response) - if not response['error']: - break - self.logWarning(response['error']) - self.relogin(user) - - return {"premium": bool(response['premium']), "trafficleft": -1, - "validuntil": response['expires'] if response['expires'] >= int(time()) else -1} - - def login(self, user, data, req): - response = json_loads(req.load("http://api.bayfiles.com/v1/account/login/%s/%s" % (user, data['password']))) - self.logDebug(response) - if response['error']: - self.logError(response['error']) - self.wrongPassword() |