summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-05-25 23:24:13 -0400
committermorpheus65535 <[email protected]>2021-05-25 23:24:13 -0400
commit61b3b869d05ba1c219c1aa8efd19f20e843b5af1 (patch)
tree98a1588944946853b5b4fe62e811ac2a0df6d303
parent48ba08e06876568b6ae8605c99ac1f771f6cbf16 (diff)
downloadbazarr-61b3b869d05ba1c219c1aa8efd19f20e843b5af1.tar.gz
bazarr-61b3b869d05ba1c219c1aa8efd19f20e843b5af1.zip
Fixed wanted subtitles tables not being refreshed on deleted or downloaded subtitles.
-rw-r--r--bazarr/get_subtitle.py2
-rw-r--r--bazarr/utils.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py
index eaa82e125..4aa16ab6b 100644
--- a/bazarr/get_subtitle.py
+++ b/bazarr/get_subtitle.py
@@ -300,11 +300,13 @@ def download_subtitle(path, language, audio_language, hi, forced, providers, pro
reversed_path = path_mappings.path_replace_reverse(path)
reversed_subtitles_path = path_mappings.path_replace_reverse(downloaded_path)
notify_sonarr(episode_metadata['sonarrSeriesId'])
+ event_stream(type='episode-wanted', action='delete', payload=episode_metadata['sonarrEpisodeId'])
else:
reversed_path = path_mappings.path_replace_reverse_movie(path)
reversed_subtitles_path = path_mappings.path_replace_reverse_movie(downloaded_path)
notify_radarr(movie_metadata['radarrId'])
+ event_stream(type='movie-wanted', action='delete', payload=movie_metadata['radarrId'])
track_event(category=downloaded_provider, action=action, label=downloaded_language)
diff --git a/bazarr/utils.py b/bazarr/utils.py
index 84ba58699..7c58de412 100644
--- a/bazarr/utils.py
+++ b/bazarr/utils.py
@@ -310,6 +310,8 @@ def delete_subtitles(media_type, language, forced, hi, media_path, subtitles_pat
subtitles_path=path_mappings.path_replace_reverse(subtitles_path))
store_subtitles(path_mappings.path_replace_reverse(media_path), media_path)
notify_sonarr(sonarr_series_id)
+ event_stream(type='episode-wanted', action='update', payload=sonarr_episode_id)
+ return True
else:
try:
os.remove(path_mappings.path_replace_movie(subtitles_path))
@@ -323,6 +325,7 @@ def delete_subtitles(media_type, language, forced, hi, media_path, subtitles_pat
subtitles_path=path_mappings.path_replace_reverse_movie(subtitles_path))
store_subtitles_movie(path_mappings.path_replace_reverse_movie(media_path), media_path)
notify_radarr(radarr_id)
+ event_stream(type='movie-wanted', action='update', payload=radarr_id)
return True