Skip to content

Commit 1b0c8fa

Browse files
author
Mint de Wit
committed
Merge remote-tracking branch 'nrk/release52' into bbc-release52
2 parents 7c907cc + 1795ea9 commit 1b0c8fa

File tree

27 files changed

+406
-97
lines changed

27 files changed

+406
-97
lines changed

meteor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"object-path": "^0.11.8",
6868
"p-lazy": "^3.1.0",
6969
"semver": "^7.5.4",
70-
"superfly-timeline": "9.0.1",
70+
"superfly-timeline": "9.0.2",
7171
"threadedclass": "^1.2.2",
7272
"timecode": "0.0.4",
7373
"type-fest": "^3.13.1",

meteor/yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ __metadata:
12111211
node-fetch: ^2.7.0
12121212
p-lazy: ^3.1.0
12131213
p-timeout: ^4.1.0
1214-
superfly-timeline: 9.0.1
1214+
superfly-timeline: 9.0.2
12151215
threadedclass: ^1.2.2
12161216
tslib: ^2.6.2
12171217
type-fest: ^3.13.1
@@ -2349,7 +2349,7 @@ __metadata:
23492349
prettier: ^2.8.8
23502350
semver: ^7.5.4
23512351
standard-version: ^9.5.0
2352-
superfly-timeline: 9.0.1
2352+
superfly-timeline: 9.0.2
23532353
threadedclass: ^1.2.2
23542354
timecode: 0.0.4
23552355
ts-jest: ^29.1.2
@@ -10026,12 +10026,12 @@ __metadata:
1002610026
languageName: node
1002710027
linkType: hard
1002810028

10029-
"superfly-timeline@npm:9.0.1":
10030-
version: 9.0.1
10031-
resolution: "superfly-timeline@npm:9.0.1"
10029+
"superfly-timeline@npm:9.0.2":
10030+
version: 9.0.2
10031+
resolution: "superfly-timeline@npm:9.0.2"
1003210032
dependencies:
1003310033
tslib: ^2.6.0
10034-
checksum: 4267eed691fe9ce9f89bf17c8aed1a98206938dd6d850c64b083e4fd3a3dc5329801c76c757450c9520375bad100ce512cc6d6a3e4a997bdfa14a4e7d65f09f2
10034+
checksum: d628d467d5384f5667bc10b877478c5b8b0a91774b5d5c5e9d9d3134b8f1b760225f2fbbb0f9ccd3e55f930c9f3719f81b9347b94ea853fbc0a18bc121d97665
1003510035
languageName: node
1003610036
linkType: hard
1003710037

packages/blueprints-integration/CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,46 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.51.1-2](https://github.com/nrkno/sofie-core/compare/v1.51.1-1...v1.51.1-2) (2024-10-24)
7+
8+
**Note:** Version bump only for package @sofie-automation/blueprints-integration
9+
10+
11+
12+
13+
14+
## [1.51.1-2](https://github.com/nrkno/sofie-core/compare/v1.51.1-1...v1.51.1-2) (2024-10-24)
15+
16+
**Note:** Version bump only for package @sofie-automation/blueprints-integration
17+
18+
19+
20+
21+
22+
## [1.51.1-1](https://github.com/nrkno/sofie-core/compare/v1.51.1-0...v1.51.1-1) (2024-10-18)
23+
24+
**Note:** Version bump only for package @sofie-automation/blueprints-integration
25+
26+
27+
28+
29+
30+
## [1.51.1-0](https://github.com/nrkno/sofie-core/compare/v1.51.0...v1.51.1-0) (2024-10-18)
31+
32+
**Note:** Version bump only for package @sofie-automation/blueprints-integration
33+
34+
35+
36+
37+
38+
## [1.51.1-0](https://github.com/nrkno/sofie-core/compare/v1.51.0...v1.51.1-0) (2024-10-18)
39+
40+
**Note:** Version bump only for package @sofie-automation/blueprints-integration
41+
42+
43+
44+
45+
646
# [1.51.0](https://github.com/nrkno/sofie-core/compare/v1.51.0-in-testing.3...v1.51.0) (2024-10-07)
747

848
**Note:** Version bump only for package @sofie-automation/blueprints-integration

packages/blueprints-integration/src/context/adlibActionContext.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { IShowStyleUserContext } from './showStyleContext'
44
import { IPartAndPieceActionContext } from './partsAndPieceActionContext'
55
import { IExecuteTSRActionsContext } from './executeTsrActionContext'
66
import { IBlueprintPart, IBlueprintPartInstance, IBlueprintPiece } from '..'
7+
import { IRouteSetMethods } from './routeSetContext'
78

89
/** Actions */
910
export interface IDataStoreMethods {
@@ -24,7 +25,8 @@ export interface IActionExecutionContext
2425
IEventContext,
2526
IDataStoreMethods,
2627
IPartAndPieceActionContext,
27-
IExecuteTSRActionsContext {
28+
IExecuteTSRActionsContext,
29+
IRouteSetMethods {
2830
/** Fetch the showstyle config for the specified part */
2931
// getNextShowStyleConfig(): Readonly<{ [key: string]: ConfigItemValue }>
3032

@@ -38,8 +40,6 @@ export interface IActionExecutionContext
3840
/** Insert a queued part to follow the current part */
3941
queuePart(part: IBlueprintPart, pieces: IBlueprintPiece[]): Promise<IBlueprintPartInstance>
4042

41-
/** Switch RouteSet State*/
42-
switchRouteSet(routeSetId: string, state: boolean | 'toggle'): Promise<void>
4343
/** Misc actions */
4444
// updateAction(newManifest: Pick<IBlueprintAdLibActionManifest, 'description' | 'payload'>): void // only updates itself. to allow for the next one to do something different
4545
// executePeripheralDeviceAction(deviceId: string, functionName: string, args: any[]): Promise<any>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { StudioRouteSet } from '@sofie-automation/shared-lib/dist/core/model/StudioRouteSet'
2+
3+
export interface IRouteSetMethods {
4+
/** Returns a list of the Routesets */
5+
listRouteSets(): Promise<Record<string, StudioRouteSet>>
6+
7+
/** Switch RouteSet State */
8+
switchRouteSet(routeSetId: string, state: boolean | 'toggle'): Promise<void>
9+
}

packages/job-worker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"node-fetch": "^2.7.0",
5353
"p-lazy": "^3.1.0",
5454
"p-timeout": "^4.1.0",
55-
"superfly-timeline": "9.0.1",
55+
"superfly-timeline": "9.0.2",
5656
"threadedclass": "^1.2.2",
5757
"tslib": "^2.6.2",
5858
"type-fest": "^3.13.1",

packages/job-worker/src/blueprints/context/adlibActions.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
Time,
1414
TSR,
1515
IBlueprintPlayoutDevice,
16+
StudioRouteSet,
1617
} from '@sofie-automation/blueprints-integration'
1718
import { PartInstanceId, PeripheralDeviceId } from '@sofie-automation/corelib/dist/dataModel/Ids'
1819
import { ReadonlyDeep } from 'type-fest'
@@ -30,6 +31,7 @@ import { executePeripheralDeviceAction, listPlayoutDevices } from '../../periphe
3031
import { ActionPartChange, PartAndPieceInstanceActionService } from './services/PartAndPieceInstanceActionService'
3132
import { BlueprintQuickLookInfo } from '@sofie-automation/blueprints-integration/dist/context/quickLoopInfo'
3233
import { setNextPartFromPart } from '../../playout/setNext'
34+
import { applyAndValidateOverrides } from '@sofie-automation/corelib/dist/settings/objectWithOverrides'
3335

3436
export class DatastoreActionExecutionContext
3537
extends ShowStyleUserContext
@@ -198,6 +200,10 @@ export class ActionExecutionContext extends ShowStyleUserContext implements IAct
198200
partInstance.blockTakeUntil(time)
199201
}
200202

203+
async listRouteSets(): Promise<Record<string, StudioRouteSet>> {
204+
return applyAndValidateOverrides(this._context.studio.routeSetsWithOverrides).obj
205+
}
206+
201207
async switchRouteSet(routeSetId: string, state: boolean | 'toggle'): Promise<void> {
202208
const affectsTimeline = this._playoutModel.switchRouteSet(routeSetId, state)
203209
this.forceRegenerateTimeline = this.forceRegenerateTimeline || affectsTimeline

packages/job-worker/src/ingest/syncChangesToPartInstance.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { validateAdlibTestingPartInstanceProperties } from '../playout/adlibTest
3030
import { ReadonlyDeep } from 'type-fest'
3131
import { convertIngestModelToPlayoutRundownWithSegments } from './commit'
3232
import { convertNoteToNotification } from '../notifications/util'
33+
import { PlayoutRundownModel } from '../playout/model/PlayoutRundownModel'
3334

3435
type PlayStatus = 'previous' | 'current' | 'next'
3536
type SyncedInstance = {
@@ -130,12 +131,22 @@ export async function syncChangesToPartInstances(
130131
pieceInstances: pieceInstancesInPart.map((p) => convertPieceInstanceToBlueprints(p.pieceInstance)),
131132
}
132133

134+
const part = newPart ?? existingPartInstance.partInstance.part
135+
136+
let playoutRundownModelForPart: PlayoutRundownModel | undefined = playoutRundownModel
137+
// Handle a case where the part is in a different rundown than the playoutRundownModel:
138+
if (playoutRundownModel.rundown._id !== part.rundownId) {
139+
playoutRundownModelForPart = playoutModel.getRundown(part.rundownId)
140+
}
141+
if (!playoutRundownModelForPart)
142+
throw new Error(`Internal Error: playoutRundownModelForPart is undefined (it should never be)`)
143+
133144
const proposedPieceInstances = getPieceInstancesForPart(
134145
context,
135146
playoutModel,
136147
previousPartInstance,
137-
playoutRundownModel,
138-
newPart ?? existingPartInstance.partInstance.part,
148+
playoutRundownModelForPart,
149+
part,
139150
await piecesThatMayBeActive,
140151
existingPartInstance.partInstance._id
141152
)
@@ -207,6 +218,7 @@ export async function syncChangesToPartInstances(
207218
})
208219
}
209220

221+
// Make sure an adlib-testing part is still labeled correctly. This could happen if the partInstance used any recently updated adlibs
210222
validateAdlibTestingPartInstanceProperties(context, playoutModel, existingPartInstance)
211223

212224
if (existingPartInstance.partInstance._id === playoutModel.playlist.currentPartInfo?.partInstanceId) {

packages/job-worker/src/playout/model/PlayoutPartInstanceModel.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ export interface PlayoutPartInstanceModel {
173173
* @param time Reported stopped time
174174
*/
175175
setReportedStoppedPlayback(time: Time): boolean
176+
/**
177+
* Set the Reported stopped playback time, including still-playing PieceInstances
178+
* @param time Reported stopped time on all available objects
179+
*/
180+
setReportedStoppedPlaybackWithPieceInstances(time: Time): boolean
176181

177182
/**
178183
* Set the rank of this PartInstance, to update it's position in the Segment

packages/job-worker/src/playout/model/implementation/PlayoutModelImpl.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,11 @@ export class PlayoutModelImpl extends PlayoutModelReadonlyImpl implements Playou
505505
deactivatePlaylist(): void {
506506
delete this.playlistImpl.activationId
507507

508+
if (this.currentPartInstance) {
509+
this.currentPartInstance.setReportedStoppedPlaybackWithPieceInstances(getCurrentTime())
510+
this.queuePartInstanceTimingEvent(this.currentPartInstance.partInstance._id)
511+
}
512+
508513
this.clearSelectedPartInstances()
509514
this.playlistImpl.quickLoop = this.quickLoopService.getUpdatedPropsByClearingMarkers()
510515

0 commit comments

Comments
 (0)