summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2024-06-24 11:13:28 -0400
committermorpheus65535 <[email protected]>2024-06-24 11:13:28 -0400
commit9049ab2238c46355e6896ed07ebf4e66442a91af (patch)
treeb627d9a448776bdc56b66de36c61b9d30881a731
parentdcbd8130dba8f0568173f61a9614e30e24e9c54e (diff)
downloadbazarr-9049ab2238c46355e6896ed07ebf4e66442a91af.tar.gz
bazarr-9049ab2238c46355e6896ed07ebf4e66442a91af.zip
Fixed issue with subtitles translation failing. #2519
-rw-r--r--bazarr/subtitles/tools/translate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bazarr/subtitles/tools/translate.py b/bazarr/subtitles/tools/translate.py
index 59e3542ad..4dcc25471 100644
--- a/bazarr/subtitles/tools/translate.py
+++ b/bazarr/subtitles/tools/translate.py
@@ -53,7 +53,7 @@ def translate_subtitles_file(video_path, source_srt_file, from_lang, to_lang, fo
partial_lines_str = joined_lines_str[:max_characters]
if len(joined_lines_str) > max_characters:
- new_partial_lines_str = partial_lines_str.rsplit('\n\n\n', 1)[0]
+ new_partial_lines_str = partial_lines_str.rsplit('\n\n', 1)[0]
else:
new_partial_lines_str = partial_lines_str
@@ -71,7 +71,7 @@ def translate_subtitles_file(video_path, source_srt_file, from_lang, to_lang, fo
logging.exception(f'BAZARR Unable to translate subtitles {source_srt_file}')
return False
else:
- translated_partial_srt_list = translated_partial_srt_text.split('\n\n\n')
+ translated_partial_srt_list = translated_partial_srt_text.split('\n\n')
translated_lines_list += translated_partial_srt_list
logging.debug(f'BAZARR saving translated subtitles to {dest_srt_file}')