Skip to content

Commit c5acb11

Browse files
committed
feat: Pass parts through convertPartToBlueprints
1 parent f97453f commit c5acb11

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/job-worker/src/blueprints/context/OnTakeContext.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { executePeripheralDeviceAction, listPlayoutDevices } from '../../periphe
2626
import { ActionPartChange, PartAndPieceInstanceActionService } from './services/PartAndPieceInstanceActionService.js'
2727
import { BlueprintQuickLookInfo } from '@sofie-automation/blueprints-integration/dist/context/quickLoopInfo'
2828
import { getOrderedPartsAfterPlayhead } from '../../playout/lookahead/util.js'
29+
import { convertPartToBlueprints } from './lib.js'
2930

3031
export class OnTakeContext extends ShowStyleUserContext implements IOnTakeContext, IEventContext {
3132
public isTakeAborted: boolean
@@ -54,7 +55,7 @@ export class OnTakeContext extends ShowStyleUserContext implements IOnTakeContex
5455
}
5556

5657
async getUpcomingParts(limit: number = 5): Promise<ReadonlyDeep<IBlueprintPart[]>> {
57-
return getOrderedPartsAfterPlayhead(this._context, this._playoutModel, limit)
58+
return getOrderedPartsAfterPlayhead(this._context, this._playoutModel, limit).map(convertPartToBlueprints)
5859
}
5960

6061
abortTake(): void {

packages/job-worker/src/blueprints/context/adlibActions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { ActionPartChange, PartAndPieceInstanceActionService } from './services/
3333
import { BlueprintQuickLookInfo } from '@sofie-automation/blueprints-integration/dist/context/quickLoopInfo'
3434
import { setNextPartFromPart } from '../../playout/setNext.js'
3535
import { getOrderedPartsAfterPlayhead } from '../../playout/lookahead/util.js'
36+
import { convertPartToBlueprints } from './lib.js'
3637

3738
export class DatastoreActionExecutionContext
3839
extends ShowStyleUserContext
@@ -104,7 +105,7 @@ export class ActionExecutionContext extends ShowStyleUserContext implements IAct
104105
}
105106

106107
async getUpcomingParts(limit: number = 5): Promise<ReadonlyDeep<IBlueprintPart[]>> {
107-
return getOrderedPartsAfterPlayhead(this._context, this._playoutModel, limit)
108+
return getOrderedPartsAfterPlayhead(this._context, this._playoutModel, limit).map(convertPartToBlueprints)
108109
}
109110

110111
async getPartInstance(part: 'current' | 'next'): Promise<IBlueprintPartInstance | undefined> {

0 commit comments

Comments
 (0)