diff --git a/src/tv2-common/getSegment.ts b/src/tv2-common/getSegment.ts index a9dbc78b..c5bd5af3 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 { @@ -96,6 +97,8 @@ interface SegmentMetadata { miniShelfVideoClipFile?: string } +const SHOW_STYLE_VARIANT_LOWER_CASE_CUE: string = 'sofie=showstylevariant' + export async function getSegmentBase( context: SegmentContext, ingestSegment: IngestSegment, @@ -125,6 +128,10 @@ export async function getSegmentBase segment.isHidden = false } + segment.definesShowStyleVariant = iNewsStory.cues.some((cue) => + cue?.some((cueElement) => cueElement.toLowerCase().includes(SHOW_STYLE_VARIANT_LOWER_CASE_CUE)) + ) + const totalTimeMs = TimeFromINewsField(iNewsStory.fields.totalTime) * 1000 let blueprintParts: BlueprintResultPart[] = [] const parsedParts: PartDefinition[] = ParseBody(