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:
Alex Christoffer Rasmussen
2025-08-03 21:43:39 +12:00
committed by Carlos Valente
parent bcf80f9d77
commit 32edf3404c
2 changed files with 11 additions and 2 deletions
@@ -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;
}
}
}
/**