mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 14:25:02 -05:00
Adjust transmission timeout for slower systems
This commit is contained in:
parent
804b0bade0
commit
db41f2f1fc
@ -207,7 +207,7 @@ class GenericClient(object):
|
|||||||
def testAuthentication(self):
|
def testAuthentication(self):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.response = self.session.get(self.url, timeout=20, verify=False)
|
self.response = self.session.get(self.url, timeout=120, verify=False)
|
||||||
except requests.exceptions.ConnectionError, e:
|
except requests.exceptions.ConnectionError, e:
|
||||||
return False, 'Error: ' + self.name + ' Connection Error'
|
return False, 'Error: ' + self.name + ' Connection Error'
|
||||||
except (requests.exceptions.MissingSchema, requests.exceptions.InvalidURL):
|
except (requests.exceptions.MissingSchema, requests.exceptions.InvalidURL):
|
||||||
|
@ -37,7 +37,8 @@ class TransmissionAPI(GenericClient):
|
|||||||
post_data = json.dumps({'method': 'session-get', })
|
post_data = json.dumps({'method': 'session-get', })
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.response = self.session.post(self.url, data=post_data.encode('utf-8'), verify=sickbeard.TORRENT_VERIFY_CERT)
|
self.response = self.session.post(self.url, data=post_data.encode('utf-8'), timeout=120,
|
||||||
|
verify=sickbeard.TORRENT_VERIFY_CERT)
|
||||||
self.auth = re.search('X-Transmission-Session-Id:\s*(\w+)', self.response.text).group(1)
|
self.auth = re.search('X-Transmission-Session-Id:\s*(\w+)', self.response.text).group(1)
|
||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user