From 5139fca5b8f60dd05be76c59296c3388d62d8199 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Tue, 15 Oct 2024 14:33:08 -0400 Subject: [PATCH] Fixed subtitles naming when saving subtitles to prevent parsing for HI content if the provider (or the user if it's an upload) specifies that it should be considered as HI. #2719 --- custom_libs/subliminal_patch/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_libs/subliminal_patch/core.py b/custom_libs/subliminal_patch/core.py index 708cbd58b..760d05bcd 100644 --- a/custom_libs/subliminal_patch/core.py +++ b/custom_libs/subliminal_patch/core.py @@ -1217,7 +1217,8 @@ def save_subtitles(file_path, subtitles, single=False, directory=None, chmod=Non continue # create subtitle path - if (subtitle.text and subtitle.format == 'srt' and + if (subtitle.text and subtitle.format == 'srt' and (hasattr(subtitle.language, 'hi') and + not subtitle.language.hi) and parse_for_hi_regex(subtitle_text=subtitle.text, alpha3_language=subtitle.language.alpha3 if (hasattr(subtitle, 'language') and hasattr(subtitle.language, 'alpha3')) else None)): subtitle.language.hi = True