Skip to content

fix: prevent a still playing part from disappearing from the timeline#1700

Draft
ianshade wants to merge 1 commit intoSofie-Automation:mainfrom
tv2norge-collab:contribute/EAV-949
Draft

fix: prevent a still playing part from disappearing from the timeline#1700
ianshade wants to merge 1 commit intoSofie-Automation:mainfrom
tv2norge-collab:contribute/EAV-949

Conversation

@ianshade
Copy link
Copy Markdown
Contributor

About the Contributor

This pull request is posted on behalf of TV 2 Norge.

Type of Contribution

This is a:

Bug fix

Current Behavior

PartInstance expected to be kept alive using e.g. previousPartKeepaliveDuration, sometimes would prematurely disappear from the timeline, if two following PartInstances started their playback.
Previous partInstance(s) were not properly considered when generating lookaheads. When a take occurred, and a partinstance became previous while its timed piece was yet to start, there would be no timed lookahead generated from that piece.

There are times when e.g. VT playback should continue into the taken part, so that a transition can safely execute till completion. Due to our transitions being separate Parts, we end up in a scenario when at a certain point three parts need to be active. Unfortunately Sofie supports only two actively playing Parts at any given time (only previous and current + next for lookahads, and briefly during autoNext, which is not enough). In our case, during a transition, the to Part quickly becomes current, whereas the transition Part becomes previous, that means the from Part no longer is considered for timeline generation, yet it is needed for its VB contents to keep playing until the transition finishes. Currently this results in either black frames during a transition, or, in conjunction with preroll applied to some pieces, holes on the PGM layer mapping.

New Behavior

Keeps track of more than one previous part, so that they are included in the timeline and ab-logic, until stopped playback;
timing properties are used for pruning, but an arbitrary limit of 10 is in place, to avoid too much data piling up if blueprints did something very wrong

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

Time Frame

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a2c703eb-013f-44a8-9807-fc7e295ace20

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

@ianshade ianshade force-pushed the contribute/EAV-949 branch 2 times, most recently from f41537d to b544d85 Compare March 27, 2026 15:32
@ianshade ianshade changed the title fix(EAV-929): prevent a still playing part from disappearing from the timeline fix: prevent a still playing part from disappearing from the timeline Mar 27, 2026
… timeline when more than two parts overlap

keeps track of more than one previous part, so that they are included in the timeline and ab-logic, until stopped playback;
timing properties are used for pruning, but an arbitrary limit of 10 is in place, to avoid too much data piling up if blueprints did something very wrong
@ianshade ianshade force-pushed the contribute/EAV-949 branch from b544d85 to 739abe8 Compare April 8, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant