From 8e23b02653f6f6805dc30ed23dd11ad7aedeba84 Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 18 Sep 2014 20:19:49 +0200 Subject: [PATCH] Stop on 429 code --- couchpotato/core/plugins/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 73bc935..8a4cada 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -231,8 +231,9 @@ class Plugin(object): try: # To many requests - if status_code == 429: - self.http_failed_request[host] = time.time() + if status_code in [429]: + self.http_failed_request[host] = 1 + self.http_failed_disabled[host] = time.time() if not self.http_failed_request.get(host): self.http_failed_request[host] = 1