1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2025-01-03 13:35:18 +00:00

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

This commit is contained in:
morpheus65535 2024-10-15 14:33:08 -04:00
parent 16499fc674
commit 5139fca5b8

View file

@ -1217,7 +1217,8 @@ def save_subtitles(file_path, subtitles, single=False, directory=None, chmod=Non
continue continue
# create subtitle path # 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 parse_for_hi_regex(subtitle_text=subtitle.text, alpha3_language=subtitle.language.alpha3 if
(hasattr(subtitle, 'language') and hasattr(subtitle.language, 'alpha3')) else None)): (hasattr(subtitle, 'language') and hasattr(subtitle.language, 'alpha3')) else None)):
subtitle.language.hi = True subtitle.language.hi = True