Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/blueprints-integration/src/api/showStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ export interface ShowStyleBlueprintManifest<
context: ISyncIngestUpdateToPartInstanceContext,
existingPartInstance: BlueprintSyncIngestPartInstance,
newData: BlueprintSyncIngestNewData,
playoutStatus: 'previous' | 'current' | 'next'
playoutStatus: 'previous' | 'current' | 'next',
playoutPersistentState: BlueprintPlayoutPersistentStore<TimelinePersistentState>
) => void

/**
Expand Down
11 changes: 10 additions & 1 deletion packages/job-worker/src/ingest/syncChangesToPartInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import { setNextPart } from '../playout/setNext.js'
import { PartId, RundownId, SegmentId } from '@sofie-automation/corelib/dist/dataModel/Ids'
import type { WrappedShowStyleBlueprint } from '../blueprints/cache.js'
import { PersistentPlayoutStateStore } from '../blueprints/context/services/PersistantStateStore.js'
import { DBSegment } from '@sofie-automation/corelib/dist/dataModel/Segment'

type PlayStatus = 'previous' | 'current' | 'next'
Expand Down Expand Up @@ -148,14 +149,22 @@
if (!this.#blueprint.blueprint.syncIngestUpdateToPartInstance)
throw new Error('Blueprint does not have syncIngestUpdateToPartInstance')

const blueprintPersistentState = new PersistentPlayoutStateStore(
this.#playoutModel.playlist.privatePlayoutPersistentState,
this.#playoutModel.playlist.publicPlayoutPersistentState
)

// The blueprint handles what in the updated part is going to be synced into the partInstance:
this.#blueprint.blueprint.syncIngestUpdateToPartInstance(
syncContext,
existingResultPartInstance,
newResultData,
instanceToSync.playStatus
instanceToSync.playStatus,
blueprintPersistentState
)

blueprintPersistentState.saveToModel(this.#playoutModel)

Check failure on line 167 in packages/job-worker/src/ingest/syncChangesToPartInstance.ts

View workflow job for this annotation

GitHub Actions / Lint Packages

Delete `······`

Check failure on line 167 in packages/job-worker/src/ingest/syncChangesToPartInstance.ts

View workflow job for this annotation

GitHub Actions / Lint Packages

Delete `······`
// Persist t-timer changes
for (const timer of syncContext.changedTTimers) {
this.#playoutModel.updateTTimer(timer)
Expand Down
Loading