Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/bazarr/commit/9cd6a489f73d2c22f65d64644e277cb52303f1ce
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
15 additions and
6 deletions
@ -464,12 +464,18 @@ def api_movies_history():
def test_url ( protocol , url ) :
url = protocol + ' :// ' + unquote ( url )
try :
result = requests . get ( url , allow_redirects = False , verify = False ). json ( ) [ ' version ' ]
result = requests . get ( url , allow_redirects = False , verify = False , timeout = 5 )
except Exception as e :
logging . exception ( ' BAZARR cannot successfully contact this URL: ' + url )
return dict ( status = False )
return dict ( status = False , error = repr ( e ) )
else :
return dict ( status = True , version = result )
if result . status_code == 200 :
return dict ( status = True , version = result . json ( ) [ ' version ' ] )
elif result . status_code == 401 :
return dict ( status = False , error = ' Access Denied. Check API key. ' )
elif 300 < = result . status_code < = 399 :
return dict ( status = False , error = ' Wrong URL Base. ' )
else :
return dict ( status = False , error = result . raise_for_status ( ) )
@app.route ( ' /test_notification/<protocol>/<path:provider> ' , methods = [ ' GET ' ] )
@ -369,6 +369,7 @@
});
$('#test_radarr_connection').on('click', function() {
$('#test_radarr_span').html('< div class = "spinner-border" role = "status" > < span class = "sr-only" > Loading...< / span > < / div > ');
if ($('#settings-radarr-ssl').is(':checked')) {
var protocol = 'https';
} else {
@ -380,7 +381,7 @@
if (data.status) {
$('#test_radarr_span').text('Test Successful: Radarr v' + data.version).css('color', 'green');
} else {
$('#test_radarr_span').text('Test Failed').css('color', 'red');
$('#test_radarr_span').text('Test Failed: ' + data.error ).css('color', 'red');
}
});
});
@ -369,6 +369,7 @@
});
$('#test_sonarr_connection').on('click', function() {
$('#test_sonarr_span').html('< div class = "spinner-border" role = "status" > < span class = "sr-only" > Loading...< / span > < / div > ');
if ($('#settings-sonarr-ssl').is(':checked')) {
var protocol = 'https';
} else {
@ -380,7 +381,8 @@
if (data.status) {
$('#test_sonarr_span').text('Test Successful: Sonarr v' + data.version).css('color', 'green');
} else {
$('#test_sonarr_span').text('Test Failed').css('color', 'red');
console.log(data);
$('#test_sonarr_span').text('Test Failed: ' + data.error).css('color', 'red');
}
});
});