Added longer timeout for slower hardware
This commit is contained in:
@@ -41,7 +41,7 @@ class Sabnzbd(Downloader):
|
|||||||
if params.get('mode') is 'addfile':
|
if params.get('mode') is 'addfile':
|
||||||
data = self.urlopen(url, timeout = 60, params = {"nzbfile": (nzb_filename, filedata)}, multipart = True, show_error = False)
|
data = self.urlopen(url, timeout = 60, params = {"nzbfile": (nzb_filename, filedata)}, multipart = True, show_error = False)
|
||||||
else:
|
else:
|
||||||
data = self.urlopen(url, show_error = False)
|
data = self.urlopen(url, timeout = 60, show_error = False)
|
||||||
except:
|
except:
|
||||||
log.error(traceback.format_exc())
|
log.error(traceback.format_exc())
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class Plugin(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# http request
|
# 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
|
# Fill in some headers
|
||||||
if not headers.get('Referer'):
|
if not headers.get('Referer'):
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class NZBClub(NZBProvider, RSS):
|
|||||||
'search': 'https://www.nzbclub.com/nzbfeed.aspx?%s',
|
'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):
|
def search(self, movie, quality):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user