From c54744c077aa7390988593143ae1b23b21ecc7a1 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Fri, 25 Oct 2024 15:47:52 -0400 Subject: [PATCH] Fix ssa not being a known format --- auto_editor/render/subtitle.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/auto_editor/render/subtitle.py b/auto_editor/render/subtitle.py index fee35cd52..1da25216e 100644 --- a/auto_editor/render/subtitle.py +++ b/auto_editor/render/subtitle.py @@ -187,7 +187,9 @@ def make_new_subtitles(tl: v3, log: Log) -> list[str]: continue parser = SubtitleParser(tl.tb) - if sub.codec in ("webvtt", "ass", "ssa"): + if sub.codec == "ssa": + format = "ass" + elif sub.codec in ("webvtt", "ass"): format = sub.codec else: log.error(f"Unknown subtitle codec: {sub.codec}") @@ -196,7 +198,7 @@ def make_new_subtitles(tl: v3, log: Log) -> list[str]: ret = make_srt(input_, s) else: ret = _ensure(input_, format, s) - parser.parse(ret, sub.codec) + parser.parse(ret, format) parser.edit(tl.v1.chunks) new_path = os.path.join(log.temp, f"new{s}s.{sub.ext}")