-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(room-responsible): add legacy room responsible handler
- Loading branch information
Showing
11 changed files
with
68 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
export { CurrentlyPlayingTrackHandler } from './curently-playing-track-handler'; | ||
export { CenturionScreenHandler } from './centurion-screen-handler'; | ||
export { default as CurrentlyPlayingTrackHandler } from './curently-playing-track-handler'; | ||
export { default as CenturionScreenHandler } from './centurion-screen-handler'; | ||
export { default as PosterScreenHandler } from './poster/poster-screen-handler'; | ||
export { default as RoomResponsibleLegacyHandler } from './room-responsible-legacy-handler'; | ||
export { default as StageEffectsHandler } from './stage-effects-handler'; | ||
export { default as TimeTrailRaceScreenHandler } from './time-trail-race-screen-handler'; |
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
19 changes: 19 additions & 0 deletions
19
src/modules/handlers/screen/room-responsible-legacy-controller.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,19 @@ | ||
import { Get, Route, Security, Tags } from 'tsoa'; | ||
import { Controller } from '@tsoa/runtime'; | ||
import { FeatureEnabled, ServerSettingsStore } from '../../server-settings'; | ||
import { ISettings } from '../../server-settings/server-setting'; | ||
import { SecurityNames } from '../../../helpers/security'; | ||
import { securityGroups } from '../../../helpers/security-groups'; | ||
|
||
@Route('handler/screen/poster') | ||
@Tags('Handlers') | ||
@FeatureEnabled('RoomResponsibleLegacyScreenURL') | ||
export class RoomResponsibleLegacyController extends Controller { | ||
@Security(SecurityNames.LOCAL, securityGroups.poster.subscriber) | ||
@Get('room-responsible-legacy-url') | ||
public getRoomResponsibleLegacyUrl(): string { | ||
return ServerSettingsStore.getInstance().getSetting( | ||
'RoomResponsibleLegacyScreenURL', | ||
) as ISettings['RoomResponsibleLegacyScreenURL']; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/modules/handlers/screen/room-responsible-legacy-handler.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,10 @@ | ||
import BaseScreenHandler from '../base-screen-handler'; | ||
import { BeatEvent, TrackChangeEvent } from '../../events/music-emitter-events'; | ||
import { FeatureEnabled } from '../../server-settings'; | ||
|
||
@FeatureEnabled('RoomResponsibleLegacyScreenURL') | ||
export default class RoomResponsibleLegacyHandler extends BaseScreenHandler { | ||
beat(event: BeatEvent): void {} | ||
|
||
changeTrack(event: TrackChangeEvent[]): void {} | ||
} |
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,7 @@ | ||
export interface ScreenHandlerSettings { | ||
RoomResponsibleLegacyScreenURL: string; | ||
} | ||
|
||
export const ScreenHandlerSettingsDefaults: ScreenHandlerSettings = { | ||
RoomResponsibleLegacyScreenURL: '', | ||
}; |
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