From 28560cc9606deece5f006e4633957a3799f7ecbd Mon Sep 17 00:00:00 2001 From: Rasmus Date: Thu, 13 Jun 2024 11:56:55 +0200 Subject: [PATCH] feat: Adds property can be used to distinguish segments that define new show style variants --- src/tv2-common/getSegment.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tv2-common/getSegment.ts b/src/tv2-common/getSegment.ts index a9dbc78b..00ec6ef1 100644 --- a/src/tv2-common/getSegment.ts +++ b/src/tv2-common/getSegment.ts @@ -86,6 +86,7 @@ export interface GetSegmentShowstyleOptions extends IBlueprintSegment { invalidity?: SegmentInvalidity + definesShowStyleVariant?: boolean } interface SegmentInvalidity { @@ -125,6 +126,10 @@ export async function getSegmentBase segment.isHidden = false } + segment.definesShowStyleVariant = iNewsStory.cues.some((cue) => + cue ? cue[0].toLowerCase().includes('showstylevariant') : false + ) + const totalTimeMs = TimeFromINewsField(iNewsStory.fields.totalTime) * 1000 let blueprintParts: BlueprintResultPart[] = [] const parsedParts: PartDefinition[] = ParseBody(