Skip to content

Commit ea2cae1

Browse files
olzzonJulusian
authored andcommitted
feat: option to disable/enable buckets (#36)
1 parent b0daf75 commit ea2cae1

File tree

13 files changed

+35
-1
lines changed

13 files changed

+35
-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
@@ -365,6 +365,7 @@ export function studioSettingsFrom(apiStudioSettings: APIStudioSettings): Comple
365365
allowAdlibTestingSegment: apiStudioSettings.allowAdlibTestingSegment,
366366
allowHold: apiStudioSettings.allowHold ?? true, // Backwards compatible
367367
allowPieceDirectPlay: apiStudioSettings.allowPieceDirectPlay ?? true, // Backwards compatible
368+
enableBuckets: apiStudioSettings.enableBuckets ?? true, // Backwards compatible
368369
}
369370
}
370371

@@ -387,6 +388,7 @@ export function APIStudioSettingsFrom(settings: IStudioSettings): Complete<APISt
387388
allowAdlibTestingSegment: settings.allowAdlibTestingSegment,
388389
allowHold: settings.allowHold,
389390
allowPieceDirectPlay: settings.allowPieceDirectPlay,
391+
enableBuckets: settings.enableBuckets,
390392
}
391393
}
392394

meteor/server/api/studio/api.ts

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,5 @@ export interface APIStudioSettings {
217217
allowAdlibTestingSegment?: boolean
218218
allowHold?: boolean
219219
allowPieceDirectPlay?: boolean
220+
enableBuckets?: boolean
220221
}

meteor/server/migration/0_1_0.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ export const addSteps = addMigrationSteps('0.1.0', [
443443
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
444444
allowHold: false,
445445
allowPieceDirectPlay: false,
446+
enableBuckets: true,
446447
},
447448
mappingsWithOverrides: wrapDefaultObject({}),
448449
blueprintConfigWithOverrides: wrapDefaultObject({}),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ describe('Migrations', () => {
128128
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
129129
allowHold: true,
130130
allowPieceDirectPlay: true,
131+
enableBuckets: true,
131132
},
132133
mappingsWithOverrides: wrapDefaultObject({}),
133134
blueprintConfigWithOverrides: wrapDefaultObject({}),
@@ -168,6 +169,7 @@ describe('Migrations', () => {
168169
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
169170
allowHold: true,
170171
allowPieceDirectPlay: true,
172+
enableBuckets: true,
171173
},
172174
mappingsWithOverrides: wrapDefaultObject({}),
173175
blueprintConfigWithOverrides: wrapDefaultObject({}),
@@ -208,6 +210,7 @@ describe('Migrations', () => {
208210
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
209211
allowHold: true,
210212
allowPieceDirectPlay: true,
213+
enableBuckets: true,
211214
},
212215
mappingsWithOverrides: wrapDefaultObject({}),
213216
blueprintConfigWithOverrides: wrapDefaultObject({}),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ describe('lib/mediaObjects', () => {
170170
minimumTakeSpan: DEFAULT_MINIMUM_TAKE_SPAN,
171171
allowHold: false,
172172
allowPieceDirectPlay: false,
173+
enableBuckets: false,
173174
}
174175

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

packages/corelib/src/dataModel/Studio.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ export interface IStudioSettings {
101101
* This behaviour is usally triggered by double-clicking on a piece in the GUI
102102
*/
103103
allowPieceDirectPlay: boolean
104+
105+
/**
106+
* Enable buckets - the default behavior is to have buckets.
107+
*/
108+
enableBuckets: boolean
104109
}
105110

106111
export type StudioLight = Omit<DBStudio, 'mappingsWithOverrides' | 'blueprintConfigWithOverrides'>

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
})

0 commit comments

Comments
 (0)