mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
refactor: gather group metadata
This commit is contained in:
committed by
Carlos Valente
parent
730cb95c04
commit
876d111c61
@@ -2,15 +2,11 @@ import { DatabaseModel, EndAction, SupportedEvent, TimeStrategy, TimerType } fro
|
||||
|
||||
export const demoDb: DatabaseModel = {
|
||||
rundowns: {
|
||||
demo: {
|
||||
id: 'demo',
|
||||
default: {
|
||||
id: 'default',
|
||||
title: 'Eurovision Demo',
|
||||
order: [
|
||||
'32d31',
|
||||
'21cd2',
|
||||
'0b371',
|
||||
'3cd28',
|
||||
'e457f',
|
||||
'block',
|
||||
'01e85',
|
||||
'1c420',
|
||||
'b7737',
|
||||
@@ -24,6 +20,25 @@ export const demoDb: DatabaseModel = {
|
||||
'd3eb1',
|
||||
],
|
||||
entries: {
|
||||
block: {
|
||||
type: SupportedEvent.Block,
|
||||
events: ['32d31', '21cd2', '0b371', '3cd28', 'e457f'],
|
||||
id: 'block',
|
||||
title: 'Test Block',
|
||||
note: '',
|
||||
skip: false,
|
||||
colour: 'hotpink',
|
||||
revision: 0,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
duration: 0,
|
||||
isFirstLinked: false,
|
||||
numEvents: 0,
|
||||
custom: {
|
||||
song: 'Sekret',
|
||||
artist: 'Ronela Hajati',
|
||||
},
|
||||
},
|
||||
'32d31': {
|
||||
type: SupportedEvent.Event,
|
||||
id: '32d31',
|
||||
@@ -33,7 +48,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 36000000,
|
||||
timeEnd: 37200000,
|
||||
@@ -62,7 +77,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 37500000,
|
||||
timeEnd: 38700000,
|
||||
@@ -91,7 +106,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 39000000,
|
||||
timeEnd: 40200000,
|
||||
@@ -120,7 +135,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 40500000,
|
||||
timeEnd: 41700000,
|
||||
@@ -149,7 +164,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 42000000,
|
||||
timeEnd: 43200000,
|
||||
@@ -196,7 +211,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 47100000,
|
||||
timeEnd: 48300000,
|
||||
@@ -225,7 +240,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 48600000,
|
||||
timeEnd: 49800000,
|
||||
@@ -254,7 +269,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 50100000,
|
||||
timeEnd: 51300000,
|
||||
@@ -283,7 +298,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 51600000,
|
||||
timeEnd: 52800000,
|
||||
@@ -312,7 +327,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 53100000,
|
||||
timeEnd: 54300000,
|
||||
@@ -359,7 +374,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 56100000,
|
||||
timeEnd: 57300000,
|
||||
@@ -388,7 +403,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 57600000,
|
||||
timeEnd: 58800000,
|
||||
@@ -417,7 +432,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 59100000,
|
||||
timeEnd: 60300000,
|
||||
@@ -446,7 +461,7 @@ export const demoDb: DatabaseModel = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
countToEnd: false,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
timeStrategy: TimeStrategy.LockEnd,
|
||||
timeStart: 60600000,
|
||||
timeEnd: 61800000,
|
||||
|
||||
@@ -15,7 +15,7 @@ export const event: Omit<OntimeEvent, 'id' | 'cue'> = {
|
||||
endAction: EndAction.None,
|
||||
timerType: TimerType.CountDown,
|
||||
timeStrategy: TimeStrategy.LockDuration,
|
||||
linkStart: null,
|
||||
linkStart: false,
|
||||
countToEnd: false,
|
||||
timeStart: 0,
|
||||
timeEnd: 0,
|
||||
@@ -23,14 +23,15 @@ export const event: Omit<OntimeEvent, 'id' | 'cue'> = {
|
||||
isPublic: false,
|
||||
skip: false,
|
||||
colour: '',
|
||||
timeWarning: 120000,
|
||||
timeDanger: 60000,
|
||||
custom: {},
|
||||
// !==== RUNTIME METADATA ====! //
|
||||
currentBlock: null,
|
||||
revision: 0, // calculated at runtime
|
||||
delay: 0, // calculated at runtime
|
||||
dayOffset: 0, // calculated at runtime
|
||||
gap: 0, // calculated at runtime
|
||||
timeWarning: 120000,
|
||||
timeDanger: 60000,
|
||||
custom: {},
|
||||
};
|
||||
|
||||
export const delay: Omit<OntimeDelay, 'id'> = {
|
||||
@@ -45,11 +46,12 @@ export const block: Omit<OntimeBlock, 'id'> = {
|
||||
events: [],
|
||||
skip: false,
|
||||
colour: '',
|
||||
custom: {},
|
||||
// !==== RUNTIME METADATA ====! //
|
||||
revision: 0, // calculated at runtime
|
||||
startTime: null, // calculated at runtime
|
||||
endTime: null, // calculated at runtime
|
||||
duration: 0, // calculated at runtime
|
||||
isFirstLinked: false, // calculated at runtime
|
||||
numEvents: 0, // calculated at runtime
|
||||
custom: {},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user