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:
parent
16499fc674
commit
5139fca5b8
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue