diff options
author | morpheus65535 <[email protected]> | 2021-06-16 19:14:21 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-06-16 19:14:21 -0400 |
commit | b9c27d53ad51ab3f30a3d37148ffd1cca4a35b0c (patch) | |
tree | 4921ee7633fbf90d3a1a6f6507de530bbf34e3c4 | |
parent | ee41b78f4e4fe015ce915d1721b880b6d2d4d40f (diff) | |
download | bazarr-b9c27d53ad51ab3f30a3d37148ffd1cca4a35b0c.tar.gz bazarr-b9c27d53ad51ab3f30a3d37148ffd1cca4a35b0c.zip |
Improved events sent to browser.v0.9.6-beta.27
-rw-r--r-- | bazarr/api.py | 2 | ||||
-rw-r--r-- | bazarr/get_series.py | 2 | ||||
-rw-r--r-- | bazarr/get_subtitle.py | 22 | ||||
-rw-r--r-- | bazarr/signalr_client.py | 6 |
4 files changed, 17 insertions, 15 deletions
diff --git a/bazarr/api.py b/bazarr/api.py index 45561962c..d9ac7154e 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -959,7 +959,7 @@ class Movies(Resource): .where(TableMovies.radarrId == radarrId)\ .execute() - list_missing_subtitles_movies(no=radarrId) + list_missing_subtitles_movies(no=radarrId, send_event=False) event_stream(type='movies', payload=radarrId) event_stream(type='badges') diff --git a/bazarr/get_series.py b/bazarr/get_series.py index 1ef7b90f1..6dbe76292 100644 --- a/bazarr/get_series.py +++ b/bazarr/get_series.py @@ -193,7 +193,7 @@ def update_one_series(series_id, action): # Update existing series in DB if action == 'updated' and existing_series: TableShows.update(series).where(TableShows.sonarrSeriesId == series['sonarrSeriesId']).execute() - sync_episodes(series_id=int(series_id), send_event=False) + sync_episodes(series_id=int(series_id), send_event=True) event_stream(type='series', action='update', payload=int(series_id)) logging.debug('BAZARR updated this series into the database:{}'.format(path_mappings.path_replace( series['path']))) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 6b5d94a53..0bedc8fb4 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -796,11 +796,12 @@ def series_download_subtitles(no): logging.info("BAZARR All providers are throttled") break - show_progress(id='series_search_progress_{}'.format(no), - header='Searching missing subtitles...', - name='Completed successfully', - value=count_episodes_details, - count=count_episodes_details) + if count_episodes_details: + show_progress(id='series_search_progress_{}'.format(no), + header='Searching missing subtitles...', + name='Completed successfully', + value=count_episodes_details, + count=count_episodes_details) hide_progress(id='series_search_progress_{}'.format(no)) @@ -960,11 +961,12 @@ def movies_download_subtitles(no): logging.info("BAZARR All providers are throttled") break - show_progress(id='movie_search_progress_{}'.format(no), - header='Searching missing subtitles...', - name='Completed successfully', - value=count_movie, - count=count_movie) + if count_movie: + show_progress(id='movie_search_progress_{}'.format(no), + header='Searching missing subtitles...', + name='Completed successfully', + value=count_movie, + count=count_movie) hide_progress(id='movie_search_progress_{}'.format(no)) diff --git a/bazarr/signalr_client.py b/bazarr/signalr_client.py index 9242a01fb..941d8bd9f 100644 --- a/bazarr/signalr_client.py +++ b/bazarr/signalr_client.py @@ -51,8 +51,8 @@ class SonarrSignalrClient: self.stop() logging.info('BAZARR SignalR client for Sonarr is connected and waiting for events.') if not args.dev: - scheduler.add_job(update_series, kwargs={'send_event': False}, max_instances=1) - scheduler.add_job(sync_episodes, kwargs={'send_event': False}, max_instances=1) + scheduler.add_job(update_series, kwargs={'send_event': True}, max_instances=1) + scheduler.add_job(sync_episodes, kwargs={'send_event': True}, max_instances=1) def stop(self, log=True): try: @@ -123,7 +123,7 @@ class RadarrSignalrClient: def on_connect_handler(): logging.info('BAZARR SignalR client for Radarr is connected and waiting for events.') if not args.dev: - scheduler.add_job(update_movies, kwargs={'send_event': False}, max_instances=1) + scheduler.add_job(update_movies, kwargs={'send_event': True}, max_instances=1) def configure(self): self.apikey_radarr = settings.radarr.apikey |