Remove forced removal of Multi-Language SRT header

Services needing this done should apply it themselves, e.g. OnMultiplex. A convenience function to do it is available now as `Subtitle.remove_multi_lang_srt_header()`, so you can do e.g., `subtitle.OnMultiplex = remove_multi_lang_srt_header` and it will pass through this function just before muxing.
This commit is contained in:
rlaphoenix 2023-12-29 16:23:04 +00:00
parent 53de34da51
commit 3c1c408ccd
1 changed files with 1 additions and 4 deletions

View File

@ -600,11 +600,8 @@ class dl:
subtitle.merge_same_cues(caption_set)
subtitle_text = writer().write(caption_set)
if sub_format == Subtitle.Codec.SubRip:
# NOW sometimes has this, when it isn't, causing mux problems
subtitle_text = subtitle_text.replace("MULTI-LANGUAGE SRT\n", "")
subtitle.path.write_text(subtitle_text, encoding="utf8")
subtitle.codec = sub_format
subtitle.move(subtitle.path.with_suffix(f".{sub_format.value.lower()}"))