From 676b45df1589ce6bce14999f1753484c4f0d7f53 Mon Sep 17 00:00:00 2001 From: Nils Hesse Date: Thu, 8 Nov 2012 13:17:28 +0100 Subject: Added some error codes to the reload.cc hoster plugin Removed some leftover comments from account plugin --- module/plugins/hoster/ReloadCc.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') 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: -- cgit v1.2.3