Skip to content

Commit

Permalink
Fixed subtitles naming when saving subtitles to prevent parsing for H…
Browse files Browse the repository at this point in the history
…I content if the provider (or the user if it's an upload) specifies that it should be considered as HI. #2719
  • Loading branch information
morpheus65535 committed Oct 15, 2024
1 parent 16499fc commit 5139fca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_libs/subliminal_patch/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5139fca

Please sign in to comment.