mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 00:13:53 +00:00
Fix tag ws api (#1709)
* fix: ws api should also reten tag and not type * fix: when starting by cue try finding the next first then check before
This commit is contained in:
committed by
Carlos Valente
parent
bcf80f9d77
commit
32edf3404c
@@ -141,7 +141,7 @@ class SocketServer implements IAdapter {
|
||||
if (reply) {
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
type: tag,
|
||||
tag,
|
||||
payload: reply.payload,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -78,7 +78,8 @@ export function findNextPlayableId(playableEventsOrder: EntryId[], currentEventI
|
||||
}
|
||||
|
||||
/**
|
||||
* returns first event that matches a given cue
|
||||
* returns next event that matches a given cue
|
||||
* then loops from the start
|
||||
*/
|
||||
export function findNextPlayableWithCue(
|
||||
rundown: Rundown,
|
||||
@@ -95,6 +96,14 @@ export function findNextPlayableWithCue(
|
||||
return event;
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < currentEventIndex; i++) {
|
||||
const eventId = playableEventsOrder[i];
|
||||
const event = rundown.entries[eventId];
|
||||
if (isOntimeEvent(event) && isPlayableEvent(event) && event.cue.toLowerCase() === lowerCaseCue) {
|
||||
return event;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user