From 71c981c8260fd1f28d147b8dafaa7065834c6f0d Mon Sep 17 00:00:00 2001 From: Rasmus Lindved Date: Fri, 14 Apr 2023 12:36:59 +0200 Subject: [PATCH] Revert "SOF-1419 StudioMics now uses new datatype" This reverts commit 3283eeb70ade3f5324081f06453b831e0dafbef0. --- src/tv2-common/blueprintConfig.ts | 7 +------ src/tv2-common/helpers/sisyfos.ts | 4 ++-- src/tv2_afvd_showstyle/__tests__/configs.ts | 12 ++++++------ src/tv2_afvd_showstyle/getRundown.ts | 8 ++++---- src/tv2_afvd_studio/helpers/config.ts | 3 +-- src/tv2_offtube_showstyle/getRundown.ts | 8 ++++---- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/tv2-common/blueprintConfig.ts b/src/tv2-common/blueprintConfig.ts index c31cc821..64483d27 100644 --- a/src/tv2-common/blueprintConfig.ts +++ b/src/tv2-common/blueprintConfig.ts @@ -73,11 +73,6 @@ export interface ProcessedStudioConfig { dsk: TableConfigItemDSK[] } -export interface StudioMic { - label: string - value: string -} - export interface TV2StudioConfigBase { MaximumPartDuration: number DefaultPartDuration: number @@ -125,7 +120,7 @@ export interface TV2StudioConfigBase { Dip: number } AtemSettings: {} - StudioMics: StudioMic[] + StudioMics: string[] SourcesRM: TableConfigItemSourceMappingWithSisyfos[] SourcesFeed: TableConfigItemSourceMappingWithSisyfos[] SourcesCam: TableConfigItemSourceMappingWithSisyfos[] diff --git a/src/tv2-common/helpers/sisyfos.ts b/src/tv2-common/helpers/sisyfos.ts index 7f903c39..b8909f1d 100644 --- a/src/tv2-common/helpers/sisyfos.ts +++ b/src/tv2-common/helpers/sisyfos.ts @@ -124,9 +124,9 @@ function getStudioMicsTimelineObj( timelineEnable: Timeline.TimelineEnable ): TSR.TimelineObjSisyfosChannels { const studioMicsChannels: TSR.TimelineObjSisyfosChannels['content']['channels'] = [] - config.studio.StudioMics.forEach((studioMic) => { + config.studio.StudioMics.forEach((layer) => { studioMicsChannels.push({ - mappedLayer: studioMic.value, + mappedLayer: layer, isPgm: 1 }) }) diff --git a/src/tv2_afvd_showstyle/__tests__/configs.ts b/src/tv2_afvd_showstyle/__tests__/configs.ts index 58ae66fa..a717fbc1 100644 --- a/src/tv2_afvd_showstyle/__tests__/configs.ts +++ b/src/tv2_afvd_showstyle/__tests__/configs.ts @@ -95,12 +95,12 @@ export const defaultStudioConfig: StudioConfig = { SourcesFeed: prepareConfig('1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10', 'SourcesFeed', false, true), SourcesReplay: prepareConfig('EVS 1:5,EVS 2:5,EPSIO:5', 'SourcesDelayedPlayback', false), StudioMics: [ - { value: 'sisyfos_source_Host_1_st_a', label: 'Host1' }, - { value: 'sisyfos_source_Host_2_st_a', label: 'Host2' }, - { value: 'sisyfos_source_Guest_1_st_a', label: 'Guest1' }, - { value: 'sisyfos_source_Guest_2_st_a', label: 'Guest2' }, - { value: 'sisyfos_source_Guest_3_st_a', label: 'Guest3' }, - { value: 'sisyfos_source_Guest_4_st_a', label: 'Guest4' } + 'sisyfos_source_Host_1_st_a', + 'sisyfos_source_Host_2_st_a', + 'sisyfos_source_Guest_1_st_a', + 'sisyfos_source_Guest_2_st_a', + 'sisyfos_source_Guest_3_st_a', + 'sisyfos_source_Guest_4_st_a' ], SwitcherSource: { MixMinusDefault: 2, diff --git a/src/tv2_afvd_showstyle/getRundown.ts b/src/tv2_afvd_showstyle/getRundown.ts index a99ef31b..82d180b2 100644 --- a/src/tv2_afvd_showstyle/getRundown.ts +++ b/src/tv2_afvd_showstyle/getRundown.ts @@ -402,8 +402,8 @@ class GlobalAdLibPiecesGenerator { content: { deviceType: TSR.DeviceType.SISYFOS, type: TSR.TimelineContentTypeSisyfos.CHANNELS, - channels: this.config.studio.StudioMics.map((studioMic) => ({ - mappedLayer: studioMic.value, + channels: this.config.studio.StudioMics.map((layer) => ({ + mappedLayer: layer, isPgm: 1 })), overridePriority: 10 @@ -431,8 +431,8 @@ class GlobalAdLibPiecesGenerator { content: { deviceType: TSR.DeviceType.SISYFOS, type: TSR.TimelineContentTypeSisyfos.CHANNELS, - channels: this.config.studio.StudioMics.map((studioMic) => ({ - mappedLayer: studioMic.value, + channels: this.config.studio.StudioMics.map((layer) => ({ + mappedLayer: layer, isPgm: 0 })), overridePriority: 10 diff --git a/src/tv2_afvd_studio/helpers/config.ts b/src/tv2_afvd_studio/helpers/config.ts index 692b435c..793f29c3 100644 --- a/src/tv2_afvd_studio/helpers/config.ts +++ b/src/tv2_afvd_studio/helpers/config.ts @@ -1,7 +1,6 @@ import { IBlueprintConfig, ICommonContext } from 'blueprints-integration' import { ProcessedStudioConfig, - StudioMic, TableConfigItemDSK, TableConfigItemSourceMapping, TableConfigItemSourceMappingWithSisyfos, @@ -21,7 +20,7 @@ export interface StudioConfig extends TV2StudioConfigBase { SourcesReplay: TableConfigItemSourceMappingWithSisyfos[] ABMediaPlayers: TableConfigItemSourceMapping[] ABPlaybackDebugLogging: boolean - StudioMics: StudioMic[] + StudioMics: string[] SwitcherSource: { SplitArtFill: number // Atem MP1 Fill SplitArtKey: number // Atem MP1 Key diff --git a/src/tv2_offtube_showstyle/getRundown.ts b/src/tv2_offtube_showstyle/getRundown.ts index d25621bb..ac0ad6ae 100644 --- a/src/tv2_offtube_showstyle/getRundown.ts +++ b/src/tv2_offtube_showstyle/getRundown.ts @@ -127,8 +127,8 @@ function getGlobalAdLibPiecesOfftube(context: ShowStyleContext ({ - mappedLayer: studioMic.value, + channels: context.config.studio.StudioMics.map((layer) => ({ + mappedLayer: layer, isPgm: 1 })), overridePriority: 10 @@ -157,8 +157,8 @@ function getGlobalAdLibPiecesOfftube(context: ShowStyleContext ({ - mappedLayer: studioMic.value, + channels: context.config.studio.StudioMics.map((layer) => ({ + mappedLayer: layer, isPgm: 0 })), overridePriority: 10