Skip to content

Commit

Permalink
Fix for Sonarr and Radarr settings testing
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Sep 18, 2018
1 parent aa952e7 commit 46d8c49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bazarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions views/settings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 46d8c49

Please sign in to comment.