mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-04 02:18:12 +00:00
Merge remote-tracking branch 'origin/development' into halali
# Conflicts: # bazarr/check_update.py
This commit is contained in:
commit
e9677354a2
3 changed files with 16 additions and 6 deletions
|
@ -1,11 +1,15 @@
|
||||||
# coding=utf-8
|
from get_argv import config_dir
|
||||||
|
|
||||||
|
from get_settings import get_general_settings
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import json
|
import json
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
import git
|
if not no_update:
|
||||||
|
import git
|
||||||
|
|
||||||
from get_argv import config_dir
|
from get_argv import config_dir
|
||||||
|
|
||||||
|
|
|
@ -1752,12 +1752,12 @@ def test_url(protocol, url):
|
||||||
return dict(status=True, version=result)
|
return dict(status=True, version=result)
|
||||||
|
|
||||||
|
|
||||||
@route(base_url + 'test_notification/<provider>', method='GET')
|
@route(base_url + 'test_notification/<protocol>/<provider:path>', method='GET')
|
||||||
@custom_auth_basic(check_credentials)
|
@custom_auth_basic(check_credentials)
|
||||||
def test_notification(provider):
|
def test_notification(protocol, provider):
|
||||||
provider = urllib.unquote(provider)
|
provider = urllib.unquote(provider)
|
||||||
apobj = apprise.Apprise()
|
apobj = apprise.Apprise()
|
||||||
apobj.add(provider)
|
apobj.add(protocol + "://" + provider)
|
||||||
|
|
||||||
apobj.notify(
|
apobj.notify(
|
||||||
title='Bazarr test notification',
|
title='Bazarr test notification',
|
||||||
|
|
|
@ -1366,8 +1366,14 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('.test_notification').on('click', function() {
|
$('.test_notification').on('click', function() {
|
||||||
|
const url_field = $(this).prev().val();
|
||||||
|
const url_protocol = url_field.split(':')[0];
|
||||||
|
const url_string = url_field.split('://')[1];
|
||||||
|
alert(url_protocol);
|
||||||
|
alert(url_string);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{base_url}}test_notification/" + encodeURIComponent($(this).prev().val()),
|
url: "{{base_url}}test_notification/" + url_protocol + "/" + encodeURIComponent(url_string),
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
$('#loader').addClass('active');
|
$('#loader').addClass('active');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue