mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-12-23 23:59:04 -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',
|
'sonarr.sync.series',
|
||||||
'update_one_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:
|
if episodesChanged:
|
||||||
# this will happen if a season's monitored status is changed.
|
# 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})',
|
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.')
|
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}')
|
logging.debug(f'BAZARR syncing this specific series from Sonarr: {series_id}')
|
||||||
|
|
||||||
# Check if there's a row in database for this 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:
|
except IntegrityError as e:
|
||||||
logging.error(f"BAZARR cannot update series {series['path']} because of {e}")
|
logging.error(f"BAZARR cannot update series {series['path']} because of {e}")
|
||||||
else:
|
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))
|
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"])}')
|
logging.debug(f'BAZARR updated this series into the database:{path_mappings.path_replace(series["path"])}')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user