Skip to content

Commit

Permalink
Fix ssa not being a known format
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Oct 25, 2024
1 parent add998d commit c54744c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions auto_editor/render/subtitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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}")
Expand Down

0 comments on commit c54744c

Please sign in to comment.