-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(EAV-487): add buckets topic to LSG
currently only featuring adLibs and actions valid for all variants (showStyleVariantId === null)
- Loading branch information
Showing
26 changed files
with
419 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ges/meteor-lib/src/collections/Buckets.ts → packages/corelib/src/dataModel/Bucket.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/live-status-gateway/src/collections/bucketAdLibActionsHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Logger } from 'winston' | ||
import { CoreHandler } from '../coreHandler' | ||
import { Collection, PublicationCollection } from '../wsHandler' | ||
import { CollectionName } from '@sofie-automation/corelib/dist/dataModel/Collections' | ||
import { BucketAdLibAction } from '@sofie-automation/corelib/dist/dataModel/BucketAdLibAction' | ||
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub' | ||
import { CollectionHandlers } from '../liveStatusServer' | ||
|
||
export class BucketAdLibActionsHandler | ||
extends PublicationCollection< | ||
BucketAdLibAction[], | ||
CorelibPubSub.bucketAdLibActions, | ||
CollectionName.BucketAdLibActions | ||
> | ||
implements Collection<BucketAdLibAction[]> | ||
{ | ||
constructor(logger: Logger, coreHandler: CoreHandler) { | ||
super(CollectionName.BucketAdLibActions, CorelibPubSub.bucketAdLibActions, logger, coreHandler) | ||
} | ||
|
||
changed(): void { | ||
const collection = this.getCollectionOrFail() | ||
this._collectionData = collection.find(undefined) | ||
this.notify(this._collectionData) | ||
} | ||
|
||
init(handlers: CollectionHandlers): void { | ||
super.init(handlers) | ||
this.setupSubscription(this._studioId, null, []) // This only matches adLibs avilable to all variants | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
packages/live-status-gateway/src/collections/bucketAdLibsHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Logger } from 'winston' | ||
import { CoreHandler } from '../coreHandler' | ||
import { Collection, PublicationCollection } from '../wsHandler' | ||
import { CollectionName } from '@sofie-automation/corelib/dist/dataModel/Collections' | ||
import { BucketAdLib } from '@sofie-automation/corelib/dist/dataModel/BucketAdLibPiece' | ||
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub' | ||
import { CollectionHandlers } from '../liveStatusServer' | ||
|
||
export class BucketAdLibsHandler | ||
extends PublicationCollection<BucketAdLib[], CorelibPubSub.bucketAdLibPieces, CollectionName.BucketAdLibPieces> | ||
implements Collection<BucketAdLib[]> | ||
{ | ||
constructor(logger: Logger, coreHandler: CoreHandler) { | ||
super(CollectionName.BucketAdLibPieces, CorelibPubSub.bucketAdLibPieces, logger, coreHandler) | ||
} | ||
|
||
changed(): void { | ||
const collection = this.getCollectionOrFail() | ||
this._collectionData = collection.find(undefined) | ||
this.notify(this._collectionData) | ||
} | ||
|
||
init(handlers: CollectionHandlers): void { | ||
super.init(handlers) | ||
this.setupSubscription(this._studioId, null, []) // This only matches adLibs avilable to all variants | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
packages/live-status-gateway/src/collections/bucketsHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Logger } from 'winston' | ||
import { CoreHandler } from '../coreHandler' | ||
import { Collection, PublicationCollection } from '../wsHandler' | ||
import { CollectionName } from '@sofie-automation/corelib/dist/dataModel/Collections' | ||
import { Bucket } from '@sofie-automation/corelib/dist/dataModel/Bucket' | ||
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub' | ||
import { CollectionHandlers } from '../liveStatusServer' | ||
|
||
export class BucketsHandler | ||
extends PublicationCollection<Bucket[], CorelibPubSub.buckets, CollectionName.Buckets> | ||
implements Collection<Bucket[]> | ||
{ | ||
constructor(logger: Logger, coreHandler: CoreHandler) { | ||
super(CollectionName.Buckets, CorelibPubSub.buckets, logger, coreHandler) | ||
} | ||
|
||
changed(): void { | ||
const collection = this.getCollectionOrFail() | ||
this._collectionData = collection.find(undefined) | ||
this.notify(this._collectionData) | ||
} | ||
|
||
init(handlers: CollectionHandlers): void { | ||
super.init(handlers) | ||
this.setupSubscription(this._studioId, null) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.