diff options
author | Nils Hesse <nphesse@gmail.com> | 2012-11-08 13:17:28 +0100 |
---|---|---|
committer | Nils Hesse <nphesse@gmail.com> | 2012-11-08 13:17:28 +0100 |
commit | 676b45df1589ce6bce14999f1753484c4f0d7f53 (patch) | |
tree | 58dae57405c35998e134b7ace2c22741af00baf7 | |
parent | Added the reload.cc plugin (diff) | |
download | pyload-676b45df1589ce6bce14999f1753484c4f0d7f53.tar.xz |
Added some error codes to the reload.cc hoster plugin
Removed some leftover comments from account plugin
-rw-r--r-- | module/plugins/accounts/ReloadCc.py | 7 | ||||
-rw-r--r-- | module/plugins/hoster/ReloadCc.py | 14 |
2 files changed, 14 insertions, 7 deletions
diff --git a/module/plugins/accounts/ReloadCc.py b/module/plugins/accounts/ReloadCc.py index 1db5ba6af..c1efd05c5 100644 --- a/module/plugins/accounts/ReloadCc.py +++ b/module/plugins/accounts/ReloadCc.py @@ -13,7 +13,7 @@ class ReloadCc(Account): def loadAccountInfo(self, user, req): - # Get user data from premiumize.me + # Get user data from reload.cc status = self.getAccountStatus(user, req) # Parse account info @@ -25,7 +25,7 @@ class ReloadCc(Account): def login(self, user, data, req): - # Get user data from premiumize.me + # Get user data from reload.cc status = self.getAccountStatus(user, req) # Check if user and password are valid @@ -43,5 +43,4 @@ class ReloadCc(Account): # Use reload.cc API v1 to retrieve account info and return the parsed json answer answer = req.load("https://api.reload.cc/login?via=pyload&v=1&get_traffic=true&user=%s&%s" % (user, pwd)) - return json_loads(answer) -
\ No newline at end of file + return json_loads(answer)
\ No newline at end of file diff --git a/module/plugins/hoster/ReloadCc.py b/module/plugins/hoster/ReloadCc.py index 4195afb89..bec7d2222 100644 --- a/module/plugins/hoster/ReloadCc.py +++ b/module/plugins/hoster/ReloadCc.py @@ -4,7 +4,7 @@ from module.common.json_layer import json_loads class ReloadCc(Hoster): __name__ = "ReloadCc" - __version__ = "0.1" + __version__ = "0.1.1" __type__ = "hoster" __description__ = """Reload.Cc hoster plugin""" @@ -49,9 +49,17 @@ class ReloadCc(Hoster): self.download(data['link'], disposition=True) # TODO: real error codes/messages elif status == 400: - self.fail("Invalid link") - elif status == 404: + self.fail("Unsupported URI") + elif status == 401: + self.fail("Invalid login") + elif status == 402: + self.fail("Payment required") + elif status == 403: + self.fail("User is disabled") + elif status == 404: self.offline() + elif status == 509: + self.fail("Fairuse traffic exceeded") elif status >= 500: self.tempOffline() else: |