1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-24 16:52:06 +00:00

Fix for Sonarr and Radarr settings testing

This commit is contained in:
morpheus65535 2018-09-17 23:38:20 -04:00
parent aa952e7bce
commit 46d8c49355
2 changed files with 3 additions and 3 deletions

View file

@ -1750,7 +1750,7 @@ def api_history():
@custom_auth_basic(check_credentials)
def test_url(protocol, url):
try:
result = requests.get(protocol + "://" + url).json()['version']
result = requests.get(protocol + "://" + url, allow_redirects=False).json()['version']
except:
return dict(status=False)
else:

View file

@ -1882,7 +1882,7 @@
} else {
protocol = 'http';
}
sonarr_url = $('#settings_sonarr_ip').val() + ":" + $('#settings_sonarr_port').val() + "/" + $('#settings_sonarr_baseurl').val().replace(/^\/|\/$/g, '') + "/api/system/status?apikey=" + $('#settings_sonarr_apikey').val();
sonarr_url = $('#settings_sonarr_ip').val() + ":" + $('#settings_sonarr_port').val() + $('#settings_sonarr_baseurl').val().replace(/\/$/, "") + "/api/system/status?apikey=" + $('#settings_sonarr_apikey').val();
$.getJSON("{{base_url}}test_url/" + protocol + "/" + encodeURIComponent(sonarr_url), function (data) {
if (data.status) {
@ -1921,7 +1921,7 @@
} else {
protocol = 'http';
}
radarr_url = $('#settings_radarr_ip').val() + ":" + $('#settings_radarr_port').val() + "/" + $('#settings_radarr_baseurl').val().replace(/^\/|\/$/g, '') + "/api/system/status?apikey=" + $('#settings_radarr_apikey').val();
radarr_url = $('#settings_radarr_ip').val() + ":" + $('#settings_radarr_port').val() + $('#settings_radarr_baseurl').val().replace(/\/$/, "") + "/api/system/status?apikey=" + $('#settings_radarr_apikey').val();
$.getJSON("{{base_url}}test_url/" + protocol + "/" + encodeURIComponent(radarr_url), function (data) {
if (data.status) {