change SickRage login. Fixes #635

This commit is contained in:
clinton-hall 2014-12-11 11:54:04 +10:30
commit aed81776a1
2 changed files with 10 additions and 2 deletions

View file

@ -266,7 +266,11 @@ class autoProcessTV:
if section == "SickBeard":
logger.debug("Opening URL: %s with params: %s" % (url, str(fork_params)), section)
r = None
r = requests.get(url, auth=(username, password), params=fork_params, stream=True, verify=False)
s = requests.Session()
login = "%s%s:%s%s/login" % (protocol,host,port,web_root)
login_params = {'username': username, 'password': password}
s.post(login, data=login_params, stream=True, verify=False)
r = s.get(url, auth=(username, password), params=fork_params, stream=True, verify=False)
elif section == "NzbDrone":
logger.debug("Opening URL: %s with data: %s" % (url, str(data)), section)
r = None

View file

@ -70,7 +70,11 @@ def autoFork(section, inputCategory):
# attempting to auto-detect fork
try:
if username and password:
r = requests.get(url, auth=(username, password), verify=False)
s = requests.Session()
login = "%s%s:%s%s/login" % (protocol,host,port,web_root)
login_params = {'username': username, 'password': password}
s.post(login, data=login_params, stream=True, verify=False)
r = s.get(url, auth=(username, password), verify=False)
else:
r = requests.get(url, verify=False)
except requests.ConnectionError: