mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 01:43:43 +00:00
feat: event cue (#473)
* feat: parse cue * refactor: get delay from backend * feat: add cue to UI * refactor: remove deprecated delay logic * refactor: extract studio clock specific logic * refactor: extract utilities * refactor: fix issue with missing key * style: prevent cue overflow * style: prevent whitespace wrap * feat: add support for cues in integrations
This commit is contained in:
@@ -30,6 +30,7 @@ export const parseRundown = (data): OntimeRundown => {
|
||||
console.log('Found rundown definition, importing...');
|
||||
const rundown = [];
|
||||
try {
|
||||
let eventIndex = 0;
|
||||
const ids = [];
|
||||
for (const e of data.rundown) {
|
||||
// cap number of events
|
||||
@@ -43,6 +44,7 @@ export const parseRundown = (data): OntimeRundown => {
|
||||
console.log('ERROR: ID collision on import, skipping');
|
||||
continue;
|
||||
}
|
||||
|
||||
// validate the right endAction is used
|
||||
if (e.endAction && !Object.values(EndAction).includes(e.endAction)) {
|
||||
e.endAction = EndAction.None;
|
||||
@@ -54,8 +56,10 @@ export const parseRundown = (data): OntimeRundown => {
|
||||
e.timerType = TimerType.CountDown;
|
||||
console.log('WARNING: invalid Timer Type provided, using default');
|
||||
}
|
||||
|
||||
if (e.type === 'event') {
|
||||
const event = validateEvent(e);
|
||||
eventIndex += 1;
|
||||
const event = validateEvent(e, eventIndex.toString());
|
||||
if (event != null) {
|
||||
rundown.push(event);
|
||||
ids.push(event.id);
|
||||
@@ -216,7 +220,12 @@ export const validateOscObject = (data: OscSubscription): boolean => {
|
||||
/**
|
||||
* Parse osc portion of an entry
|
||||
*/
|
||||
export const parseOsc = (data: { osc?: Partial<OSCSettings> }, enforce: boolean): Partial<OSCSettings> => {
|
||||
export const parseOsc = (
|
||||
data: {
|
||||
osc?: Partial<OSCSettings>;
|
||||
},
|
||||
enforce: boolean,
|
||||
): OSCSettings | Record<string, never> => {
|
||||
if ('osc' in data) {
|
||||
console.log('Found OSC definition, importing...');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user