mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-04 10:28:15 +00:00
Merge branch 'development' into hermes
# Conflicts: # bazarr/main.py # views/providers.tpl
This commit is contained in:
commit
50901a3b04
1 changed files with 3 additions and 3 deletions
|
@ -684,11 +684,11 @@ def api_movies_history():
|
||||||
@app.route('/test_url/<protocol>/<path:url>', methods=['GET'])
|
@app.route('/test_url/<protocol>/<path:url>', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
def test_url(protocol, url):
|
def test_url(protocol, url):
|
||||||
|
|
||||||
url = unquote(url)
|
url = unquote(url)
|
||||||
try:
|
try:
|
||||||
result = requests.get(protocol + "://" + url, allow_redirects=False, verify=False).json()['version']
|
result = requests.get(url, allow_redirects=False, verify=False).json()['version']
|
||||||
except:
|
except Exception as e:
|
||||||
|
logging.exception('BAZARR cannot successfully contact this URL: ' + url)
|
||||||
return dict(status=False)
|
return dict(status=False)
|
||||||
else:
|
else:
|
||||||
return dict(status=True, version=result)
|
return dict(status=True, version=result)
|
||||||
|
|
Loading…
Add table
Reference in a new issue