Skip to content

Commit 5367219

Browse files
authored
feat: option to disable/enable buckets (#36)
1 parent 8dcf8c7 commit 5367219

File tree

14 files changed

+32
-1
lines changed

14 files changed

+32
-1
lines changed

meteor/__mocks__/defaultCollectionObjects.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export function defaultStudio(_id: StudioId): DBStudio {
112112
fallbackPartDuration: DEFAULT_FALLBACK_PART_DURATION,
113113
allowHold: false,
114114
allowPieceDirectPlay: false,
115+
enableBuckets: false,
115116
}),
116117
_rundownVersionHash: '',
117118
routeSetsWithOverrides: wrapDefaultObject({}),

meteor/server/api/rest/v1/typeConversion.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ export function studioSettingsFrom(apiStudioSettings: APIStudioSettings): Comple
328328
allowAdlibTestingSegment: apiStudioSettings.allowAdlibTestingSegment,
329329
allowHold: apiStudioSettings.allowHold ?? true, // Backwards compatible
330330
allowPieceDirectPlay: apiStudioSettings.allowPieceDirectPlay ?? true, // Backwards compatible
331+
enableBuckets: apiStudioSettings.enableBuckets ?? true, // Backwards compatible
331332
}
332333
}
333334

@@ -350,6 +351,7 @@ export function APIStudioSettingsFrom(settings: IStudioSettings): Complete<APISt
350351
allowAdlibTestingSegment: settings.allowAdlibTestingSegment,
351352
allowHold: settings.allowHold,
352353
allowPieceDirectPlay: settings.allowPieceDirectPlay,
354+
enableBuckets: settings.enableBuckets,
353355
}
354356
}
355357

meteor/server/api/studio/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export async function insertStudioInner(organizationId: OrganizationId | null, n
5151
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
5252
allowHold: false,
5353
allowPieceDirectPlay: false,
54+
enableBuckets: true,
5455
}),
5556
_rundownVersionHash: '',
5657
routeSetsWithOverrides: wrapDefaultObject({}),

meteor/server/lib/rest/v1/studios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,5 @@ export interface APIStudioSettings {
189189
allowAdlibTestingSegment?: boolean
190190
allowHold?: boolean
191191
allowPieceDirectPlay?: boolean
192+
enableBuckets?: boolean
192193
}

meteor/server/migration/0_1_0.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const addSteps = addMigrationSteps('0.1.0', [
3535
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
3636
allowHold: false,
3737
allowPieceDirectPlay: false,
38+
enableBuckets: true,
3839
}),
3940
mappingsWithOverrides: wrapDefaultObject({}),
4041
blueprintConfigWithOverrides: wrapDefaultObject({}),

meteor/server/migration/__tests__/migrations.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ describe('Migrations', () => {
127127
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
128128
allowHold: true,
129129
allowPieceDirectPlay: true,
130+
enableBuckets: true,
130131
}),
131132
mappingsWithOverrides: wrapDefaultObject({}),
132133
blueprintConfigWithOverrides: wrapDefaultObject({}),
@@ -167,6 +168,7 @@ describe('Migrations', () => {
167168
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
168169
allowHold: true,
169170
allowPieceDirectPlay: true,
171+
enableBuckets: true,
170172
}),
171173
mappingsWithOverrides: wrapDefaultObject({}),
172174
blueprintConfigWithOverrides: wrapDefaultObject({}),
@@ -207,6 +209,7 @@ describe('Migrations', () => {
207209
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
208210
allowHold: true,
209211
allowPieceDirectPlay: true,
212+
enableBuckets: true,
210213
}),
211214
mappingsWithOverrides: wrapDefaultObject({}),
212215
blueprintConfigWithOverrides: wrapDefaultObject({}),

meteor/server/publications/pieceContentStatusUI/__tests__/checkPieceContentStatus.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ describe('lib/mediaObjects', () => {
251251
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
252252
allowHold: false,
253253
allowPieceDirectPlay: false,
254+
enableBuckets: false,
254255
}
255256

256257
const mockDefaultStudio = defaultStudio(protectString('studio0'))

packages/job-worker/src/__mocks__/defaultCollectionObjects.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export function defaultStudio(_id: StudioId): DBStudio {
109109
allowAdlibTestingSegment: true,
110110
allowHold: true,
111111
allowPieceDirectPlay: true,
112+
enableBuckets: true,
112113
}),
113114
routeSetsWithOverrides: wrapDefaultObject({}),
114115
routeSetExclusivityGroupsWithOverrides: wrapDefaultObject({}),

packages/job-worker/src/blueprints/__tests__/config.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ describe('Test blueprint config', () => {
1717
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
1818
allowHold: true,
1919
allowPieceDirectPlay: true,
20+
enableBuckets: true,
2021
}),
2122
blueprintConfigWithOverrides: wrapDefaultObject({ sdfsdf: 'one', another: 5 }),
2223
})
@@ -42,6 +43,7 @@ describe('Test blueprint config', () => {
4243
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
4344
allowHold: true,
4445
allowPieceDirectPlay: true,
46+
enableBuckets: true,
4547
}),
4648
blueprintConfigWithOverrides: wrapDefaultObject({ sdfsdf: 'one', another: 5 }),
4749
})

packages/job-worker/src/playout/upgrade.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export async function handleBlueprintUpgradeForStudio(context: JobContext, _data
117117
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
118118
allowHold: true,
119119
allowPieceDirectPlay: true,
120+
enableBuckets: true,
120121
}
121122

122123
await context.directCollections.Studios.update(context.studioId, {

0 commit comments

Comments
 (0)