From f1942377b5bd1c26ab6850984e3ed037b4d419ce Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 25 Jun 2012 22:23:08 +0200 Subject: [PATCH] Added longer timeout for slower hardware --- couchpotato/core/downloaders/sabnzbd/main.py | 2 +- couchpotato/core/plugins/base.py | 2 +- couchpotato/core/providers/nzb/nzbclub/main.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/downloaders/sabnzbd/main.py b/couchpotato/core/downloaders/sabnzbd/main.py index e05a41c6..64b24509 100644 --- a/couchpotato/core/downloaders/sabnzbd/main.py +++ b/couchpotato/core/downloaders/sabnzbd/main.py @@ -41,7 +41,7 @@ class Sabnzbd(Downloader): if params.get('mode') is 'addfile': data = self.urlopen(url, timeout = 60, params = {"nzbfile": (nzb_filename, filedata)}, multipart = True, show_error = False) else: - data = self.urlopen(url, show_error = False) + data = self.urlopen(url, timeout = 60, show_error = False) except: log.error(traceback.format_exc()) return False diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 2ad616b3..1c98868e 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -95,7 +95,7 @@ class Plugin(object): return False # http request - def urlopen(self, url, timeout = 10, params = {}, headers = {}, multipart = False, show_error = True): + def urlopen(self, url, timeout = 30, params = {}, headers = {}, multipart = False, show_error = True): # Fill in some headers if not headers.get('Referer'): diff --git a/couchpotato/core/providers/nzb/nzbclub/main.py b/couchpotato/core/providers/nzb/nzbclub/main.py index 39835ded..dedddb85 100644 --- a/couchpotato/core/providers/nzb/nzbclub/main.py +++ b/couchpotato/core/providers/nzb/nzbclub/main.py @@ -20,7 +20,7 @@ class NZBClub(NZBProvider, RSS): 'search': 'https://www.nzbclub.com/nzbfeed.aspx?%s', } - http_time_between_calls = 3 #seconds + http_time_between_calls = 4 #seconds def search(self, movie, quality):