Skip to content

Commit c98fbfc

Browse files
committed
Fix wrong empty words check logic
1 parent b9aca0f commit c98fbfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/utils/subtitle_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def iterate_subtitles():
172172
if len(subtitle) > 0:
173173
yield subtitle
174174

175-
if len(result["segments"]) > 0 and "words" in result["segments"][0]:
175+
if len(result["segments"]) > 0 and "words" in result["segments"][0] and result["segments"][0]["words"]:
176176
for subtitle in iterate_subtitles():
177177
subtitle_start = self.format_timestamp(subtitle[0]["start"])
178178
subtitle_end = self.format_timestamp(subtitle[-1]["end"])

0 commit comments

Comments
 (0)