From 09bf84332eaab4ded856772f53ff0323df123b78 Mon Sep 17 00:00:00 2001 From: ianshade Date: Mon, 12 Apr 2021 14:22:46 +0200 Subject: [PATCH] fix: do not clear elements and engines when going rehearsal<->active --- src/devices/vizMSE.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/devices/vizMSE.ts b/src/devices/vizMSE.ts index 6c33b04f14..62908157c9 100644 --- a/src/devices/vizMSE.ts +++ b/src/devices/vizMSE.ts @@ -336,6 +336,7 @@ export class VizMSEDevice extends DeviceWithState implements IDevic * @param okToDestroyStuff Whether it is OK to do things that affects playout visibly */ async makeReady (okToDestroyStuff?: boolean, activeRundownPlaylistId?: string): Promise { + const previousPlaylistId = this._vizmseManager?.activeRundownPlaylistId if (this._vizmseManager) { const preload = !!(this._initOptions && this._initOptions.onlyPreloadActiveRundown) await this._vizmseManager.activate(activeRundownPlaylistId, preload) @@ -348,7 +349,8 @@ export class VizMSEDevice extends DeviceWithState implements IDevic if (this._vizmseManager) { if ( this._initOptions && - this._initOptions.clearAllOnMakeReady + this._initOptions.clearAllOnMakeReady && + activeRundownPlaylistId !== previousPlaylistId ) { if (this._initOptions.clearAllTemplateName) { await this._vizmseManager.clearAll({ @@ -784,6 +786,10 @@ class VizMSEManager extends EventEmitter { private _activeRundownPlaylistId: string | undefined private _preloadedRundownPlaylistId: string | undefined + public get activeRundownPlaylistId () { + return this._activeRundownPlaylistId + } + constructor ( private _parentVizMSEDevice: VizMSEDevice, private _vizMSE: MSE,