@@ -3,7 +3,7 @@ import { check } from '../../lib/check'
33import { PeripheralDevice } from '@sofie-automation/corelib/dist/dataModel/PeripheralDevice'
44import { NrcsIngestDataCache , MediaObjects , Parts , Rundowns , Segments } from '../../collections'
55import { literal } from '../../lib/tempLib'
6- import { lazyIgnore } from '../../lib/lib'
6+ import { lazyIgnore , MeteorStartupAsync } from '../../lib/lib'
77import { IngestRundown , IngestSegment , IngestPart , IngestPlaylist } from '@sofie-automation/blueprints-integration'
88import { logger } from '../../logging'
99import { RundownIngestDataCache } from './ingestCache'
@@ -363,17 +363,15 @@ async function listIngestRundowns(peripheralDevice: PeripheralDevice): Promise<s
363363}
364364
365365// hackGetMediaObjectDuration stuff
366- Meteor . startup ( ( ) => {
367- if ( Meteor . isServer ) {
368- MediaObjects . observe (
369- { } ,
370- {
371- added : onMediaObjectChanged ,
372- changed : onMediaObjectChanged ,
373- } ,
374- { fields : { _id : 1 , mediaId : 1 , mediainfo : 1 , studioId : 1 } }
375- )
376- }
366+ MeteorStartupAsync ( async ( ) => {
367+ await MediaObjects . observe (
368+ { } ,
369+ {
370+ added : onMediaObjectChanged ,
371+ changed : onMediaObjectChanged ,
372+ } ,
373+ { fields : { _id : 1 , mediaId : 1 , mediainfo : 1 , studioId : 1 } }
374+ )
377375} )
378376
379377interface MediaObjectUpdatedIds {
0 commit comments