From 48ddebfcdbf25031dbffbeb875552cb4279f540b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Fri, 2 Oct 2020 09:48:53 -0400 Subject: [PATCH] Fix to disable async_mode for Apprise as it was causing issues. --- bazarr/logger.py | 1 + bazarr/main.py | 6 +++++- bazarr/notifier.py | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bazarr/logger.py b/bazarr/logger.py index 2e36bc2e1..1dd062762 100644 --- a/bazarr/logger.py +++ b/bazarr/logger.py @@ -93,6 +93,7 @@ def configure_logging(debug=False): else: logging.getLogger("sqlite3worker").setLevel(logging.CRITICAL) logging.getLogger("apscheduler").setLevel(logging.WARNING) + logging.getLogger("apprise").setLevel(logging.WARNING) logging.getLogger("subliminal").setLevel(logging.CRITICAL) logging.getLogger("subliminal_patch").setLevel(logging.CRITICAL) logging.getLogger("subzero").setLevel(logging.ERROR) diff --git a/bazarr/main.py b/bazarr/main.py index bfb213cd8..91c681eee 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -478,7 +478,11 @@ def test_url(protocol, url): def test_notification(protocol, provider): provider = unquote(provider) - apobj = apprise.Apprise() + + asset = apprise.AppriseAsset(async_mode=False) + + apobj = apprise.Apprise(asset=asset) + apobj.add(protocol + "://" + provider) apobj.notify( diff --git a/bazarr/notifier.py b/bazarr/notifier.py index 0349f641d..1eb83b0a7 100644 --- a/bazarr/notifier.py +++ b/bazarr/notifier.py @@ -67,7 +67,9 @@ def send_notifications(sonarr_series_id, sonarr_episode_id, message): series = get_series_name(sonarr_series_id) episode = get_episode_name(sonarr_episode_id) - apobj = apprise.Apprise() + asset = apprise.AppriseAsset(async_mode=False) + + apobj = apprise.Apprise(asset=asset) for provider in providers: if provider['url'] is not None: @@ -83,7 +85,9 @@ def send_notifications_movie(radarr_id, message): providers = get_notifier_providers() movie = get_movies_name(radarr_id) - apobj = apprise.Apprise() + asset = apprise.AppriseAsset(async_mode=False) + + apobj = apprise.Apprise(asset=asset) for provider in providers: if provider['url'] is not None: