Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import type {
IBlueprintPiece,
IBlueprintPieceInstance,
} from '../documents'
import type { IEventContext } from './eventContext'

export interface ISyncIngestUpdateToPartInstanceContext extends IRundownUserContext {
export interface ISyncIngestUpdateToPartInstanceContext extends IRundownUserContext, IEventContext {
/** Sync a pieceInstance. Inserts the pieceInstance if new, updates if existing. Optionally pass in a mutated Piece, to override the content of the instance */
syncPieceInstance(
pieceInstanceId: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
serializePieceTimelineObjectsBlob,
} from '@sofie-automation/corelib/dist/dataModel/Piece'
import { EXPECTED_INGEST_TO_PLAYOUT_TIME } from '@sofie-automation/shared-lib/dist/core/constants'
import { getCurrentTime } from '../../lib'

export class SyncIngestUpdateToPartInstanceContext
extends RundownUserContext
Expand All @@ -40,6 +41,10 @@ export class SyncIngestUpdateToPartInstanceContext

private partInstance: PlayoutPartInstanceModel | null

public get hasRemovedPartInstance(): boolean {
return !this.partInstance
}

constructor(
private readonly _context: JobContext,
contextInfo: ContextInfo,
Expand Down Expand Up @@ -209,4 +214,8 @@ export class SyncIngestUpdateToPartInstanceContext

return unprotectStringArray(pieceInstanceIdsToRemove)
}

getCurrentTime(): number {
return getCurrentTime()
}
}
Loading
Loading