From ac31e2d47a5e67c818d7dfb199097bec181f82f5 Mon Sep 17 00:00:00 2001 From: Mohab Fekry Date: Mon, 14 Oct 2024 14:35:49 +0200 Subject: [PATCH] Ensure string keys for JSON output to maintain insertion order when parsing in frontend Change-Id: I212035420a82e249a5ef4ba5fcf217b7c74eeb93 --- service/combiner/combiner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/service/combiner/combiner.py b/service/combiner/combiner.py index d24e881..62458d6 100644 --- a/service/combiner/combiner.py +++ b/service/combiner/combiner.py @@ -375,7 +375,11 @@ def render(self): combo = dataclasses.asdict(video_variant) combo.pop('render_settings', None) combo.update(rendered_variant_paths) - rendered_combos[str(video_variant.variant_id)] = combo + combo['av_segments'] = { + f'_{segment_id}': segment + for segment_id, segment in combo['av_segments'].items() + } + rendered_combos[f'_{video_variant.variant_id}'] = combo logging.info( 'RENDERING - Rendered variant as: %r', rendered_combos,