Skip to content

Conversation

amtins
Copy link
Member

@amtins amtins commented May 19, 2025

Description

Fixes #321, by removing chapters when the media type is not an episode. This follows the decision made during API discussion #146. Since Pillarbox lacks an automatic metadata update mechanism, removing chapters helps prevent confusion when a highlight is added during a live sports event.

Additionally, chapters in media types such as EXTRACT, TRAILER, and CLIP are considered a bug and should not be present.

Changes made

  • Remove chapters if the media is not an EPISODE
  • Add a test case

…PISODE

Fixes #321, by removing chapters when the media type is not an episode.
This follows the decision made during API discussion
[#146](SRGSSR/pillarbox-documentation#146 (comment)).
Since Pillarbox lacks an automatic metadata update mechanism, removing chapters helps prevent
confusion when a highlight is added during a live sports event.

Additionally, chapters in media types such as EXTRACT, TRAILER, and CLIP are considered a bug
and should not be present.

- Remove chapters if the media is not an EPISODE
- Add a test case
Copy link

github-actions bot commented May 19, 2025

PR Preview Action v1.6.1
Preview removed because the pull request was closed.
2025-05-22 17:16 UTC

Copy link

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
97.91% (+0% 🔼)
845/863
🟢 Branches
92.49% (+0.04% 🔼)
394/426
🟢 Functions 98.7% 228/231
🟢 Lines
98.28% (+0% 🔼)
801/815

Test suite run success

249 tests passing in 10 suites.

Report generated by 🧪jest coverage report action from 939f356

@amtins amtins requested a review from jboix May 19, 2025 11:33
Copy link
Member

@jboix jboix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amtins amtins merged commit caafece into main May 22, 2025
5 checks passed
@amtins amtins deleted the fix/321-remove-segments-for-livestreams branch May 22, 2025 17:16
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Pillarbox May 22, 2025
Copy link

🎉 This PR is included in version 1.21.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Remove segments for livestreams

2 participants