Skip to content

Commit b99ad65

Browse files
committed
SOFIE-288 | apply code review suggestions
1 parent 08c120f commit b99ad65

6 files changed

Lines changed: 23 additions & 25 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
poolName: 'VTR'
2+
sessionName: 'clip_intro'
3+
playerId: 1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
type: object
2+
title: AbSessionAssignment
3+
properties:
4+
poolName:
5+
description: The name of the AB Pool this session is for
6+
type: string
7+
sessionName:
8+
description: Name of the session
9+
type: string
10+
playerId:
11+
description: The assigned player ID
12+
oneOf:
13+
- type: string
14+
- type: number
15+
required: [poolName, sessionName, playerId]
16+
additionalProperties: false

packages/live-status-gateway-api/api/components/piece/pieceStatus/pieceStatus-example.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ tags: ['camera']
66
publicData:
77
switcherSource: 1
88
abSessions:
9-
- poolName: 'VTR'
10-
sessionName: 'clip_intro'
11-
playerId: 1
9+
- $ref: './abSessionAssignment-example.yaml'

packages/live-status-gateway-api/api/components/piece/pieceStatus/pieceStatus.yaml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
11
$defs:
2-
abSessionAssignment:
3-
type: object
4-
title: AbSessionAssignment
5-
properties:
6-
poolName:
7-
description: The name of the AB Pool this session is for
8-
type: string
9-
sessionName:
10-
description: Name of the session
11-
type: string
12-
playerId:
13-
description: The assigned player ID
14-
oneOf:
15-
- type: string
16-
- type: number
17-
required: [poolName, sessionName, playerId]
18-
additionalProperties: false
192
pieceStatus:
203
type: object
214
title: PieceStatus
@@ -43,7 +26,7 @@ $defs:
4326
description: AB playback session assignments for this Piece
4427
type: array
4528
items:
46-
$ref: '#/$defs/abSessionAssignment'
29+
$ref: './abSessionAssignment.yaml'
4730
required: [id, name, sourceLayer, outputLayer]
4831
additionalProperties: false
4932
examples:

packages/live-status-gateway/src/topics/activePlaylistTopic.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ const PLAYLIST_KEYS = [
5050
'timing',
5151
'startedPlayback',
5252
'quickLoop',
53-
'assignedAbSessions',
54-
'trackedAbSessions',
5553
] as const
5654
type Playlist = PickKeys<DBRundownPlaylist, typeof PLAYLIST_KEYS>
5755

packages/live-status-gateway/src/topics/helpers/pieceStatus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { unprotectString } from '@sofie-automation/server-core-integration'
22
import type { ShowStyleBaseExt } from '../../collections/showStyleBaseHandler.js'
33
import type { PieceInstanceMin } from '../../collections/pieceInstancesHandler.js'
4-
import type { PieceStatus } from '@sofie-automation/live-status-gateway-api'
4+
import type { AbSessionAssignment, PieceStatus } from '@sofie-automation/live-status-gateway-api'
55
import { clone } from '@sofie-automation/corelib/dist/lib'
66
import type { DBRundownPlaylist } from '@sofie-automation/corelib/dist/dataModel/RundownPlaylist'
77
import type { PickKeys } from '@sofie-automation/shared-lib/dist/lib/types'
@@ -33,7 +33,7 @@ function getAbSessions(pieceInstance: PieceInstanceMin, playlist?: PlaylistAbSes
3333
return []
3434
}
3535

36-
const abSessions = []
36+
const abSessions: AbSessionAssignment[] = []
3737

3838
for (const session of pieceInstance.piece.abSessions) {
3939
const trackedSession = playlist.trackedAbSessions.find(

0 commit comments

Comments
 (0)