From 3bfd96d53c83f31c328b6ca433a4bb359cf23201 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Wed, 24 Apr 2024 05:35:24 +0100 Subject: [PATCH] fix(dl): Automatically convert TTML Subs to WebVTT for MKV support --- devine/commands/dl.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/devine/commands/dl.py b/devine/commands/dl.py index 2891f05..8134a8c 100644 --- a/devine/commands/dl.py +++ b/devine/commands/dl.py @@ -614,11 +614,14 @@ class dl: break video_track_n += 1 - if sub_format: - with console.status(f"Converting Subtitles to {sub_format.name}..."): - for subtitle in title.tracks.subtitles: + 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 = []