diff --git a/render.py b/render.py index cbf8828..16a8ac7 100644 --- a/render.py +++ b/render.py @@ -877,6 +877,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 @@ -1076,7 +1077,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)