summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2023-02-26 07:46:27 -0500
committermorpheus65535 <[email protected]>2023-02-26 07:46:27 -0500
commit2acf2451b44e0dd407e299170ed37117b0eeff7b (patch)
tree2f6439f92df6987050818250389bc45f3bfafc2b
parent7502c596380236a34cf6516c5d88b1877c5e0ec5 (diff)
downloadbazarr-1.1.5-beta.25.tar.gz
bazarr-1.1.5-beta.25.zip
Fixed history logging of manually uploaded subtitles. #2072v1.1.5-beta.25
-rw-r--r--bazarr/subtitles/upload.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/bazarr/subtitles/upload.py b/bazarr/subtitles/upload.py
index 28b60454d..306be2e6b 100644
--- a/bazarr/subtitles/upload.py
+++ b/bazarr/subtitles/upload.py
@@ -20,6 +20,7 @@ from sonarr.notify import notify_sonarr
from languages.custom_lang import CustomLanguage
from app.database import TableEpisodes, TableMovies, TableShows, get_profiles_list
from app.event_handler import event_stream
+from subtitles.processing import ProcessSubtitlesResult
from .sync import sync_subtitles
from .post_processing import postprocessing
@@ -119,7 +120,6 @@ def manual_upload_subtitle(path, language, forced, hi, media_type, subtitle, aud
modifier_string = " forced"
else:
modifier_string = ""
- message = language_from_alpha3(language) + modifier_string + " Subtitles manually uploaded."
if hi:
modifier_code = ":hi"
@@ -167,4 +167,15 @@ def manual_upload_subtitle(path, language, forced, hi, media_type, subtitle, aud
event_stream(type='movie', action='update', payload=movie_metadata['radarrId'])
event_stream(type='movie-wanted', action='delete', payload=movie_metadata['radarrId'])
- return message, reversed_path, reversed_subtitles_path
+ result = ProcessSubtitlesResult(message=language_from_alpha3(language) + modifier_string + " Subtitles manually "
+ "uploaded.",
+ reversed_path=reversed_path,
+ downloaded_language_code2=uploaded_language_code2,
+ downloaded_provider=None,
+ score=None,
+ forced=None,
+ subtitle_id=None,
+ reversed_subtitles_path=reversed_subtitles_path,
+ hearing_impaired=None)
+
+ return result