mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-12-23 15:50:53 -05:00
Fixed subtitles search happening for series/seasons when a SignalR event is received from Sonarr even if defer subtitles searching was enabled. #3023
This commit is contained in:
@@ -298,7 +298,8 @@ def dispatcher(data):
|
||||
'sonarr.sync.series',
|
||||
'update_one_series',
|
||||
[],
|
||||
{'series_id': media_id, 'action': action})
|
||||
{'series_id': media_id, 'action': action,
|
||||
'defer_search': settings.sonarr.defer_search_signalr})
|
||||
if episodesChanged:
|
||||
# this will happen if a season's monitored status is changed.
|
||||
jobs_queue.feed_jobs_pending_queue(f'Sync episodes for series {series_title} ({series_year})',
|
||||
|
||||
@@ -189,7 +189,7 @@ def update_series(send_event=True):
|
||||
logging.debug('BAZARR All series synced from Sonarr into database.')
|
||||
|
||||
|
||||
def update_one_series(series_id, action):
|
||||
def update_one_series(series_id, action, defer_search=False):
|
||||
logging.debug(f'BAZARR syncing this specific series from Sonarr: {series_id}')
|
||||
|
||||
# Check if there's a row in database for this series ID
|
||||
@@ -253,7 +253,7 @@ def update_one_series(series_id, action):
|
||||
except IntegrityError as e:
|
||||
logging.error(f"BAZARR cannot update series {series['path']} because of {e}")
|
||||
else:
|
||||
sync_episodes(series_id=int(series_id), send_event=False)
|
||||
sync_episodes(series_id=int(series_id), send_event=False, defer_search=defer_search)
|
||||
event_stream(type='series', action='update', payload=int(series_id))
|
||||
logging.debug(f'BAZARR updated this series into the database:{path_mappings.path_replace(series["path"])}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user