Skip to content

Commit 4c2ee62

Browse files
committed
fix: rabbit review points
Fixed bad null check + stabilises Diff counter after deactivating playlist.
1 parent e142364 commit 4c2ee62

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

packages/webui/src/client/lib/rundownTiming.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,11 @@ export function getPlaylistTimingDiff(
887887
diff =
888888
(timingContext.asPlayedPlaylistDuration || 0) -
889889
(timing.expectedDuration ?? timingContext.totalPlaylistDuration ?? 0)
890-
} else if (PlaylistTiming.isPlaylistTimingBackTime(timing)) {
891-
// we want to see how late we've ended compared to the expectedEnd
892-
diff = startedPlayback + (timingContext.asPlayedPlaylistDuration || 0) - timing.expectedEnd
890+
} else if (PlaylistTiming.isPlaylistDurationTimed(timing)) {
891+
// we want to know how heavy/light we were compared to the original plan
892+
diff =
893+
(timingContext.asPlayedPlaylistDuration || 0) -
894+
(timing.expectedDuration ?? timingContext.totalPlaylistDuration ?? 0)
893895
}
894896
}
895897

packages/webui/src/client/ui/RundownView/RundownHeader/RundownHeaderExpectedEnd.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function RundownHeaderExpectedEnd({
3030
{!simplified && expectedEnd !== undefined ? (
3131
<Countdown label={t('Plan. End')} time={expectedEnd} className="rundown-header__show-timers-countdown" />
3232
) : null}
33-
{estEnd !== null ? (
33+
{estEnd !== undefined ? (
3434
<Countdown label={t('Est. End')} time={estEnd} className="rundown-header__show-timers-countdown" />
3535
) : null}
3636
</div>

0 commit comments

Comments
 (0)