From 7b3efae858ab37d318467625c97374e2dac6099b Mon Sep 17 00:00:00 2001 From: Martastain Date: Sat, 23 Nov 2024 22:05:31 +0100 Subject: [PATCH] fix: compute broadcast time correctly when playlist is looped --- backend/api/rundown/get_rundown.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/api/rundown/get_rundown.py b/backend/api/rundown/get_rundown.py index db7fbf17..fc6c784e 100644 --- a/backend/api/rundown/get_rundown.py +++ b/backend/api/rundown/get_rundown.py @@ -129,7 +129,8 @@ async def get_rundown(request: RundownRequestModel) -> RundownResponseModel: airstatus: ObjectStatus | None = None if (as_start := record["as_start"]) is not None: - ts_broadcast = as_start + if as_start > ts_broadcast: + ts_broadcast = as_start as_stop = record["as_stop"] airstatus = ObjectStatus.AIRED if as_stop else ObjectStatus.ONAIR