fix writer fail on segments 0

This commit is contained in:
Simon Sorg
2023-08-17 14:18:16 +02:00
parent 1b092de19a
commit 0767597bff

View File

@ -226,6 +226,9 @@ class SubtitlesWriter(ResultWriter):
max_line_width = 1000 if raw_max_line_width is None else raw_max_line_width
preserve_segments = max_line_count is None or raw_max_line_width is None
if len(result["segments"]) == 0:
return
def iterate_subtitles():
line_len = 0
line_count = 1