@@ -49,6 +49,7 @@ import { IngestJobs } from '@sofie-automation/corelib/dist/worker/ingest'
4949import { UserPermissions } from '@sofie-automation/meteor-lib/dist/userPermissions'
5050import { assertConnectionHasOneOfPermissions } from '../security/auth'
5151import { checkAccessToRundown } from '../security/check'
52+ import { protectString , unprotectString } from '@sofie-automation/corelib/dist/protectedString'
5253
5354const PERMISSIONS_FOR_PLAYOUT_USERACTION : Array < keyof UserPermissions > = [ 'studio' ]
5455const 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 }
0 commit comments