@@ -4,12 +4,14 @@ import { PieceInstance } from '@sofie-automation/corelib/dist/dataModel/PieceIns
4
4
import { PieceInstanceFields , ContentCache } from './reactiveContentCacheForPieceInstances'
5
5
import { SourceLayers } from '@sofie-automation/corelib/dist/dataModel/ShowStyleBase'
6
6
import {
7
+ createPartCurrentTimes ,
7
8
PieceInstanceWithTimings ,
8
9
processAndPrunePieceInstanceTimings ,
9
10
} from '@sofie-automation/corelib/dist/playout/processAndPrune'
10
11
import { applyAndValidateOverrides } from '@sofie-automation/corelib/dist/settings/objectWithOverrides'
11
12
import { IWrappedAdLib } from '@sofie-automation/meteor-lib/dist/triggers/actionFilterChainCompilers'
12
13
import { areSetsEqual , doSetsIntersect } from '@sofie-automation/corelib/dist/lib'
14
+ import { getCurrentTime } from '../../lib/lib'
13
15
14
16
export class TagsService {
15
17
protected onAirPiecesTags : Set < string > = new Set ( )
@@ -130,12 +132,11 @@ export class TagsService {
130
132
) : PieceInstanceWithTimings [ ] {
131
133
// Approximate when 'now' is in the PartInstance, so that any adlibbed Pieces will be timed roughly correctly
132
134
const partStarted = partInstanceTimings ?. plannedStartedPlayback
133
- const nowInPart = partStarted === undefined ? 0 : Date . now ( ) - partStarted
134
135
135
136
return processAndPrunePieceInstanceTimings (
136
137
sourceLayers ,
137
138
pieceInstances as PieceInstance [ ] ,
138
- nowInPart ,
139
+ createPartCurrentTimes ( getCurrentTime ( ) , partStarted ) ,
139
140
false ,
140
141
false
141
142
)
0 commit comments