nrkno / sofie-core

Sofie Core: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
124 stars 40 forks source link

fix(Client): Piece-dependency for expectedDuration calculation causes the Diff to be inconsistent (SOFIE-3004) #1163

Closed jstarpl closed 4 months ago

jstarpl commented 4 months ago

About the Contributor

This PR is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix

Current Behavior

Calculating the Diff requires knowing all Part's expectedDurations, that means that in order to calculate the Diff, one needs to have all the Pieces for a Playlist loaded. The GUI trims down the amount of data it needs in local cache ("minimongo") in order to maximize performance, and as such, will only have some Pieces loaded at any given time. The Presenters' screen for example will only have the Pieces for the current and next Part loaded. This causes the Diff to be different on the Presenters' screen and in the Rundown View. The Diff in the Rundown View changes as the user scrolls around the page.

New Behavior

The expectedDuration calculation does not consider Pieces prerolls. This will introduce minimal (in real-life scenarios) innacuracies in the calculation, but at least will make the Diff counter consistent.

Testing Instructions

Time Frame

Other Information

Status

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 72.00000% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 58.01%. Comparing base (391bfc4) to head (c862582). Report is 8 commits behind head on release50.

Files Patch % Lines
meteor/client/lib/rundown.ts 40.00% 3 Missing :warning:
packages/corelib/src/playout/timings.ts 0.00% 3 Missing :warning:
meteor/client/lib/rundownTiming.ts 94.11% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release50 #1163 +/- ## ============================================= - Coverage 58.29% 58.01% -0.28% ============================================= Files 480 480 Lines 79094 79060 -34 Branches 4152 3119 -1033 ============================================= - Hits 46107 45866 -241 - Misses 32930 33189 +259 + Partials 57 5 -52 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.