From a65ab3159586e7c50feaa4c5b00972267aa10fdd Mon Sep 17 00:00:00 2001 From: j Date: Thu, 27 Nov 2025 19:06:11 +0100 Subject: [PATCH] fix join_subtitles --- render.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/render.py b/render.py index 8df5cf6..e62f513 100644 --- a/render.py +++ b/render.py @@ -876,6 +876,7 @@ def shift_clips(data, offset): for clip in data: clip['in'] += offset clip['out'] += offset + return data def scene_subtitles(scene, options): import item.models @@ -1075,7 +1076,9 @@ def join_subtitles(base_prefix, options): scenes = list(sorted(glob('%s/*/scene.json' % base_prefix))) data = [] position = 0 - for scene in scenes: + for scene_json in scenes: + with open(scene_json) as fd: + scene = json.load(fd) subs = scene_subtitles(scene, options) data += shift_clips(subs, position) position += get_scene_duration(scene)