Improved events sent to browser.

pull/1443/head v0.9.6-beta.27
morpheus65535 3 years ago
parent ee41b78f4e
commit b9c27d53ad

@ -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')

@ -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'])))

@ -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))

@ -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

Loading…
Cancel
Save