From 1f187d89ca80e3734bf0831e2f7940bb01235695 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Sun, 1 Oct 2023 14:13:38 -0400 Subject: [PATCH] Fixed history logging issue for episodes and movies subtitles. --- bazarr/api/episodes/episodes_subtitles.py | 2 ++ bazarr/api/movies/movies_subtitles.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bazarr/api/episodes/episodes_subtitles.py b/bazarr/api/episodes/episodes_subtitles.py index b02d8926a..9207b3c28 100644 --- a/bazarr/api/episodes/episodes_subtitles.py +++ b/bazarr/api/episodes/episodes_subtitles.py @@ -81,6 +81,8 @@ class EpisodesSubtitles(Resource): title, 'series', profile_id=get_profile_id(episode_id=sonarrEpisodeId))) if isinstance(result, list) and len(result): result = result[0] + if isinstance(result, tuple) and len(result): + result = result[0] history_log(1, sonarrSeriesId, sonarrEpisodeId, result) send_notifications(sonarrSeriesId, sonarrEpisodeId, result.message) store_subtitles(result.path, episodePath) diff --git a/bazarr/api/movies/movies_subtitles.py b/bazarr/api/movies/movies_subtitles.py index 5225e82b7..bf7cebebf 100644 --- a/bazarr/api/movies/movies_subtitles.py +++ b/bazarr/api/movies/movies_subtitles.py @@ -79,6 +79,8 @@ class MoviesSubtitles(Resource): sceneName, title, 'movie', profile_id=get_profile_id(movie_id=radarrId))) if isinstance(result, list) and len(result): result = result[0] + if isinstance(result, tuple) and len(result): + result = result[0] history_log_movie(1, radarrId, result) store_subtitles_movie(result.path, moviePath) else: