Skip to content

Commit a5c8283

Browse files
author
Mint de Wit
committed
chore: expose setAsNext ignoreQuickLoop param
1 parent a590920 commit a5c8283

File tree

12 files changed

+67
-15
lines changed

12 files changed

+67
-15
lines changed

meteor/server/api/userActions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ class ServerUserActionAPI
190190
eventTime: Time,
191191
rundownPlaylistId: RundownPlaylistId,
192192
partDelta: number,
193-
segmentDelta: number
193+
segmentDelta: number,
194+
ignoreQuickLoop: boolean | null
194195
) {
195196
return ServerClientAPI.runUserActionInLogForPlaylistOnWorker(
196197
this,
@@ -207,6 +208,7 @@ class ServerUserActionAPI
207208
playlistId: rundownPlaylistId,
208209
partDelta: partDelta,
209210
segmentDelta: segmentDelta,
211+
ignoreQuickLoop: ignoreQuickLoop ?? undefined,
210212
}
211213
)
212214
}

packages/blueprints-integration/src/context/adlibActionContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface IActionExecutionContext
3131
// getNextShowStyleConfig(): Readonly<{ [key: string]: ConfigItemValue }>
3232

3333
/** Move the next part through the rundown. Can move by either a number of parts, or segments in either direction. */
34-
moveNextPart(partDelta: number, segmentDelta: number): Promise<void>
34+
moveNextPart(partDelta: number, segmentDelta: number, ignoreQuickloop?: boolean): Promise<void>
3535
/** Set flag to perform take after executing the current action. Returns state of the flag after each call. */
3636
takeAfterExecuteAction(take: boolean): Promise<boolean>
3737
/** Inform core that a take out of the current partinstance should be blocked until the specified time */

packages/blueprints-integration/src/context/onSetAsNextContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ export interface IOnSetAsNextContext extends IShowStyleUserContext, IEventContex
7676
* Multiple calls of this inside one call to `onSetAsNext` will replace earlier calls.
7777
* @returns Whether a new Part was found using the provided offset
7878
*/
79-
moveNextPart(partDelta: number, segmentDelta: number): Promise<boolean>
79+
moveNextPart(partDelta: number, segmentDelta: number, ignoreQuickLoop: boolean): Promise<boolean>
8080
}

packages/blueprints-integration/src/triggers.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ export interface IMoveNextAction extends ITriggeredActionBase {
230230
* @memberof IMoveNextAction
231231
*/
232232
parts: number
233+
/**
234+
* When moving the next part it should ignore any of the boundaries set by the QuickLoop feature
235+
*
236+
* @type {boolean}
237+
* @memberof IMoveNextAction
238+
*/
239+
ignoreQuickLoop: boolean
233240
}
234241

235242
export interface ICreateSnapshotForDebugAction extends ITriggeredActionBase {

packages/corelib/src/worker/studio.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export interface StopPiecesOnSourceLayersProps extends RundownPlayoutPropsBase {
231231
export interface MoveNextPartProps extends RundownPlayoutPropsBase {
232232
partDelta: number
233233
segmentDelta: number
234+
ignoreQuickLoop?: boolean
234235
}
235236
export type ActivateHoldProps = RundownPlayoutPropsBase
236237
export type DeactivateHoldProps = RundownPlayoutPropsBase

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class OnSetAsNextContext
121121
return this.partAndPieceInstanceService.removePieceInstances('next', pieceInstanceIds)
122122
}
123123

124-
async moveNextPart(partDelta: number, segmentDelta: number): Promise<boolean> {
124+
async moveNextPart(partDelta: number, segmentDelta: number, ignoreQuickLoop?: boolean): Promise<boolean> {
125125
if (typeof partDelta !== 'number') throw new Error('partDelta must be a number')
126126
if (typeof segmentDelta !== 'number') throw new Error('segmentDelta must be a number')
127127

@@ -132,7 +132,13 @@ export class OnSetAsNextContext
132132
}
133133

134134
this.pendingMoveNextPart = {
135-
selectedPart: selectNewPartWithOffsets(this.jobContext, this.playoutModel, partDelta, segmentDelta),
135+
selectedPart: selectNewPartWithOffsets(
136+
this.jobContext,
137+
this.playoutModel,
138+
partDelta,
139+
segmentDelta,
140+
ignoreQuickLoop
141+
),
136142
}
137143

138144
return !!this.pendingMoveNextPart.selectedPart

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,14 @@ export class ActionExecutionContext extends ShowStyleUserContext implements IAct
158158
return this.partAndPieceInstanceService.queuePart(rawPart, rawPieces)
159159
}
160160

161-
async moveNextPart(partDelta: number, segmentDelta: number): Promise<void> {
162-
const selectedPart = selectNewPartWithOffsets(this._context, this._playoutModel, partDelta, segmentDelta)
161+
async moveNextPart(partDelta: number, segmentDelta: number, ignoreQuickloop?: boolean): Promise<void> {
162+
const selectedPart = selectNewPartWithOffsets(
163+
this._context,
164+
this._playoutModel,
165+
partDelta,
166+
segmentDelta,
167+
ignoreQuickloop
168+
)
163169
if (selectedPart) await setNextPartFromPart(this._context, this._playoutModel, selectedPart, true)
164170
}
165171

packages/job-worker/src/playout/setNextJobs.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ export async function handleMoveNextPart(context: JobContext, data: MoveNextPart
6868
}
6969
},
7070
async (playoutModel) => {
71-
const selectedPart = selectNewPartWithOffsets(context, playoutModel, data.partDelta, data.segmentDelta)
71+
const selectedPart = selectNewPartWithOffsets(
72+
context,
73+
playoutModel,
74+
data.partDelta,
75+
data.segmentDelta,
76+
data.ignoreQuickLoop
77+
)
7278
if (!selectedPart) return null
7379

7480
await setNextPartFromPart(context, playoutModel, selectedPart, true)

packages/meteor-lib/src/api/userActions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export interface NewUserActionAPI {
5858
eventTime: Time,
5959
rundownPlaylistId: RundownPlaylistId,
6060
partDelta: number,
61-
segmentDelta: number
61+
segmentDelta: number,
62+
ignoreQuickLoop?: boolean
6263
): Promise<ClientAPI.ClientResponse<PartId | null>>
6364
prepareForBroadcast(
6465
userEvent: string,

packages/meteor-lib/src/triggers/actionFactory.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,15 +554,16 @@ export function createAction(
554554
)
555555
}
556556
case PlayoutActions.moveNext:
557-
return createUserActionWithCtx(triggersContext, action, UserAction.MOVE_NEXT, async (e, ts, ctx) =>
558-
triggersContext.MeteorCall.userAction.moveNext(
557+
return createUserActionWithCtx(triggersContext, action, UserAction.MOVE_NEXT, async (e, ts, ctx) => {
558+
return triggersContext.MeteorCall.userAction.moveNext(
559559
e,
560560
ts,
561561
ctx.rundownPlaylistId.get(),
562562
action.parts ?? 0,
563-
action.segments ?? 0
563+
action.segments ?? 0,
564+
action.ignoreQuickLoop
564565
)
565-
)
566+
})
566567
case PlayoutActions.reloadRundownPlaylistData:
567568
if (isActionTriggeredFromUiContext(triggersContext, action)) {
568569
return createRundownPlaylistSoftResyncAction(action.filterChain as IGUIContextFilterLink[])

0 commit comments

Comments
 (0)