Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function notifyCurrentPlayingPart (
peripheralDevice: PeripheralDevice,
rundown: Rundown,
oldPlayingPartExternalId: string | null,
newPlayingPartExternalId: string | null
) {
if (oldPlayingPartExternalId) {
setStoryStatus(peripheralDevice._id, rundown, oldPlayingPartExternalId, MOS.IMOSObjectStatus.STOP)
.catch(e => logger.error('Error in setStoryStatus', e))
}
if (newPlayingPartExternalId) {
setStoryStatus(peripheralDevice._id, rundown, newPlayingPartExternalId, MOS.IMOSObjectStatus.PLAY)
.catch(e => logger.error('Error in setStoryStatus', e))
}
}
function setStoryStatus (deviceId: string, rundown: Rundown, storyId: string, status: MOS.IMOSObjectStatus): Promise {