Skip to content

Commit

Permalink
feat: Adds property can be used to distinguish segments that define n…
Browse files Browse the repository at this point in the history
…ew show style variants
  • Loading branch information
RasmusAlbrektsen committed Jun 13, 2024
1 parent 1f308ce commit 28560cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tv2-common/getSegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export interface GetSegmentShowstyleOptions<ShowStyleConfig extends TV2ShowStyle

interface Segment<T> extends IBlueprintSegment<T> {
invalidity?: SegmentInvalidity
definesShowStyleVariant?: boolean
}

interface SegmentInvalidity {
Expand Down Expand Up @@ -125,6 +126,10 @@ export async function getSegmentBase<ShowStyleConfig extends TV2ShowStyleConfig>
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(
Expand Down

0 comments on commit 28560cc

Please sign in to comment.