Skip to content

Commit

Permalink
no log: removed some unused code during sync process with Sonarr and …
Browse files Browse the repository at this point in the history
…Radarr
  • Loading branch information
morpheus65535 committed Jan 11, 2025
1 parent 8705f80 commit e9c6e1f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions bazarr/radarr/sync/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,6 @@ def update_one_movie(movie_id, action, defer_search=False):
logging.debug(
f'BAZARR inserted this movie into the database:{path_mappings.path_replace_movie(movie["path"])}')

# Storing existing subtitles
logging.debug(f'BAZARR storing subtitles for this movie: {path_mappings.path_replace_movie(movie["path"])}')
store_subtitles_movie(movie['path'], path_mappings.path_replace_movie(movie['path']))

# Downloading missing subtitles
if defer_search:
logging.debug(
Expand Down
6 changes: 1 addition & 5 deletions bazarr/sonarr/sync/episodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,6 @@ def sync_one_episode(episode_id, defer_search=False):
logging.debug(
f'BAZARR inserted this episode into the database:{path_mappings.path_replace(episode["path"])}')

# Storing existing subtitles
logging.debug(f'BAZARR storing subtitles for this episode: {path_mappings.path_replace(episode["path"])}')
store_subtitles(episode['path'], path_mappings.path_replace(episode['path']))

# Downloading missing subtitles
if defer_search:
logging.debug(
Expand All @@ -270,4 +266,4 @@ def sync_one_episode(episode_id, defer_search=False):
else:
logging.debug(
f'BAZARR downloading missing subtitles for this episode: {path_mappings.path_replace(episode["path"])}')
episode_download_subtitles(episode_id)
episode_download_subtitles(episode_id, send_progress=True)
2 changes: 1 addition & 1 deletion bazarr/subtitles/indexer/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def store_subtitles(original_path, reversed_path, use_cache=True):
.values(subtitles=str(actual_subtitles))
.where(TableEpisodes.path == original_path))
matching_episodes = database.execute(
select(TableEpisodes.sonarrEpisodeId, TableEpisodes.sonarrSeriesId)
select(TableEpisodes.sonarrEpisodeId)
.where(TableEpisodes.path == original_path))\
.all()

Expand Down

0 comments on commit e9c6e1f

Please sign in to comment.