Skip to content

Commit ee69a1a

Browse files
justandrasolzzon
andauthored
feat: cue from anywhere (#1573)
* feat: cue from anywhere * fix: reusing adLib partInstances --------- Co-authored-by: olzzon <github@olzzon.dk>
1 parent 9d5c8da commit ee69a1a

File tree

25 files changed

+1926
-647
lines changed

25 files changed

+1926
-647
lines changed

meteor/server/api/userActions.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import { IngestJobs } from '@sofie-automation/corelib/dist/worker/ingest'
4949
import { UserPermissions } from '@sofie-automation/meteor-lib/dist/userPermissions'
5050
import { assertConnectionHasOneOfPermissions } from '../security/auth'
5151
import { checkAccessToRundown } from '../security/check'
52+
import { protectString, unprotectString } from '@sofie-automation/corelib/dist/protectedString'
5253

5354
const PERMISSIONS_FOR_PLAYOUT_USERACTION: Array<keyof UserPermissions> = ['studio']
5455
const PERMISSIONS_FOR_BUCKET_MODIFICATION: Array<keyof UserPermissions> = ['studio']
@@ -121,8 +122,9 @@ class ServerUserActionAPI
121122
userEvent: string,
122123
eventTime: Time,
123124
rundownPlaylistId: RundownPlaylistId,
124-
nextPartId: PartId,
125-
timeOffset: number | null
125+
nextPartOrInstanceId: PartId | PartInstanceId,
126+
timeOffset: number | null,
127+
isInstance: boolean | null
126128
) {
127129
return ServerClientAPI.runUserActionInLogForPlaylistOnWorker(
128130
this,
@@ -131,12 +133,15 @@ class ServerUserActionAPI
131133
rundownPlaylistId,
132134
() => {
133135
check(rundownPlaylistId, String)
134-
check(nextPartId, String)
136+
check(nextPartOrInstanceId, String)
135137
},
136138
StudioJobs.SetNextPart,
137139
{
138140
playlistId: rundownPlaylistId,
139-
nextPartId,
141+
nextPartId: isInstance ? undefined : protectString<PartId>(unprotectString(nextPartOrInstanceId)),
142+
nextPartInstanceId: isInstance
143+
? protectString<PartInstanceId>(unprotectString(nextPartOrInstanceId))
144+
: undefined,
140145
setManually: true,
141146
nextTimeOffset: timeOffset ?? undefined,
142147
}

packages/corelib/src/worker/studio.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ export interface ActivateRundownPlaylistProps extends RundownPlayoutPropsBase {
254254
}
255255
export type DeactivateRundownPlaylistProps = RundownPlayoutPropsBase
256256
export interface SetNextPartProps extends RundownPlayoutPropsBase {
257-
nextPartId: PartId
257+
nextPartId?: PartId
258+
nextPartInstanceId?: PartInstanceId
258259
setManually?: boolean
259260
nextTimeOffset?: number
260261
}

0 commit comments

Comments
 (0)