mirror of https://github.com/devine-dl/devine.git
fix(dl): Automatically convert TTML Subs to WebVTT for MKV support
This commit is contained in:
parent
f23100077e
commit
3bfd96d53c
|
@ -614,11 +614,14 @@ class dl:
|
|||
break
|
||||
video_track_n += 1
|
||||
|
||||
if sub_format:
|
||||
with console.status(f"Converting Subtitles to {sub_format.name}..."):
|
||||
with console.status("Converting Subtitles..."):
|
||||
for subtitle in title.tracks.subtitles:
|
||||
if sub_format:
|
||||
if subtitle.codec != sub_format:
|
||||
subtitle.convert(sub_format)
|
||||
elif subtitle.codec == Subtitle.Codec.TimedTextMarkupLang:
|
||||
# MKV does not support TTML, VTT is the next best option
|
||||
subtitle.convert(Subtitle.Codec.WebVTT)
|
||||
|
||||
with console.status("Checking Subtitles for Fonts..."):
|
||||
font_names = []
|
||||
|
|
Loading…
Reference in New Issue