diff --git a/bazarr/main.py b/bazarr/main.py index 3ea960f4f..54be486ef 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -62,6 +62,7 @@ import hashlib import time import urllib from six import text_type +import apprise from get_languages import load_language_in_db, language_from_alpha3 from get_providers import load_providers, get_providers, get_providers_auth @@ -1729,6 +1730,20 @@ def test_url(protocol, url): else: return dict(status=True, version=result) + +@route(base_url + 'test_notification/', method='GET') +@custom_auth_basic(check_credentials) +def test_notification(provider): + print provider + apobj = apprise.Apprise() + apobj.add(provider) + + apobj.notify( + title='Bazarr test notification', + body=('Test notification') + ) + + import warnings # Mute DeprecationWarning warnings.simplefilter("ignore", DeprecationWarning) diff --git a/views/settings.tpl b/views/settings.tpl index bdbbff1fb..9e9184202 100644 --- a/views/settings.tpl +++ b/views/settings.tpl @@ -1348,6 +1348,7 @@
+
Test Notification
@@ -1364,6 +1365,18 @@ - - - - - - - - - - - - - - System - Bazarr - - - - -
-
Loading...
-
- % include('menu.tpl') - -
-
-
-
- % from get_settings import get_auth_settings - % if get_auth_settings()[0] != 'None': -
- % end -
- -
-
- - - - - - - - - - - %for task in task_list: - - - - - - - %end - -
NameExecution FrequencyNext Execution
{{task[0]}}{{task[1]}}{{task[2]}} -
- -
-
-
-
-
-
- -
-
- - -
- -
-
- - %try: page_size - %except NameError: page_size = "25" - %end - %if page_size != -1: -
-
-
-
- - - / {{max_page}} - - -
-
Total records: {{row_count}}
-
-
- %end -
-
-
-
About
-
-
-
-
- -
-
-
-
- {{bazarr_version}} -
-
-
-
- % from get_settings import get_general_settings - % if get_general_settings()[12]: -
-
- -
-
-
-
- {{sonarr_version}} -
-
-
-
- % end - % if get_general_settings()[13]: -
-
- -
-
-
-
- {{radarr_version}} -
-
-
-
- % end -
-
- -
-
-
-
- {{operating_system}} -
-
-
-
-
-
- -
-
-
-
- {{python_version}} -
-
-
-
-
-
- -
-
-
-
- {{bazarr_dir}} -
-
-
-
-
-
- -
-
-
-
- {{config_dir}} -
-
-
-
-
-
-
More info
-
-
-
-
- -
-
- -
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
- -
-
- -
-
-
- -
- %for release in releases: -

- %if release[0][1:] == bazarr_version: - {{release[0]}}
Current version
- %else: - {{release[0]}} - %end -

-
- %release_lines = release[1].split('\r\n') - %for i, release_line in enumerate(release_lines): - %if i == 0: -
-

{{release_line}}

-
- %else: -
{{release_line}}
- %end - %end -
-
-
- %end -
-
- % include('footer.tpl') - - - - - + + + + + + + + + + + + + + System - Bazarr + + + + +
+
Loading...
+
+ % include('menu.tpl') + +
+
+
+
+ % from get_settings import get_auth_settings + % if get_auth_settings()[0] != 'None': +
+ % end +
+ +
+
+ + + + + + + + + + + %for task in task_list: + + + + + + + %end + +
NameExecution FrequencyNext Execution
{{task[0]}}{{task[1]}}{{task[2]}} +
+ +
+
+
+
+
+
+ +
+
+ + +
+ +
+
+ + %try: page_size + %except NameError: page_size = "25" + %end + %if page_size != -1: +
+
+
+
+ + + / {{max_page}} + + +
+
Total records: {{row_count}}
+
+
+ %end +
+
+
+
About
+
+
+
+
+ +
+
+
+
+ {{bazarr_version}} +
+
+
+
+ % from get_settings import get_general_settings + % if get_general_settings()[12]: +
+
+ +
+
+
+
+ {{sonarr_version}} +
+
+
+
+ % end + % if get_general_settings()[13]: +
+
+ +
+
+
+
+ {{radarr_version}} +
+
+
+
+ % end +
+
+ +
+
+
+
+ {{operating_system}} +
+
+
+
+
+
+ +
+
+
+
+ {{python_version}} +
+
+
+
+
+
+ +
+
+
+
+ {{bazarr_dir}} +
+
+
+
+
+
+ +
+
+
+
+ {{config_dir}} +
+
+
+
+
+
+
More info
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+ %for release in releases: +

+ %if release[0][1:] == bazarr_version: + {{release[0]}}
Current version
+ %else: + {{release[0]}} + %end +

+
+ %release_lines = release[1].split('\r\n') + %for i, release_line in enumerate(release_lines): + %if i == 0: +
+

{{release_line}}

+
+ %else: +
{{release_line}}
+ %end + %end +
+
+
+ %end +
+
+ % include('footer.tpl') + + + + + \ No newline at end of file