Skip to content

Filter DRM formats before stream deduplication - #149

Merged
alexeichhorn merged 1 commit into
fix/playback-error-messagesfrom
fix/filter-drm-formats
Oct 24, 2026
Merged

alexeichhorn merged 1 commit into
fix/playback-error-messagesfrom
fix/filter-drm-formats

Conversation

@alexeichhorn

@alexeichhorn alexeichhorn commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner
  • Problem: DRM-protected formats from an earlier client can displace playable alternatives with the same itag.
  • Solution: Decode drmFamilies and discard protected formats before signature processing and deduplication, preserving formats with missing or empty DRM markers.

Note

Overview Stream extraction now filters DRM-protected formats before deduplication by itag, preventing protected entries from displacing playable alternatives when combining client responses.

DRM handling The streaming format model now decodes the optional drmFamilies field. Extraction.applyDescrambler excludes regular and adaptive formats with nonempty DRM families while retaining formats whose field is absent or empty.

@alexeichhorn
alexeichhorn added this pull request to stack #148 October 23, 2026 21:49
@alexeichhorn
alexeichhorn marked this pull request as ready for review October 23, 2026 21:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T21:59:19.210662Z 049a6a6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 51322c5e-c044-42ca-aa6b-a7aa78771c43
📥 Commits

Reviewing files that changed from the base of the PR and between 7ccca9d and 049a6a6.

📒 Files selected for processing: 3
  • Sources/YouTubeKit/Extraction.swift
  • Sources/YouTubeKit/InnerTube.swift
  • Tests/YouTubeKitTests/ExtractionTests.swift

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

StreamingData.Format now decodes optional DRM-family metadata. Extraction.applyDescrambler removes formats with nonempty DRM-family lists before processing cipher data and deduplicating itags. A test checks that clear video and audio formats remain after formats from two responses are combined.

Possibly related issues

  • Issue 144: Filtering DRM formats before itag deduplication can preserve a playable format when an earlier client provides a protected format with the same itag. This may relate to remote-mode link retrieval, but the change does not claim to resolve every remote-mode failure.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 049a6

No identified issue remains that should prevent merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: filtering DRM formats before stream deduplication.
Description check Passed The description accurately explains the DRM filtering problem, the solution, and the affected processing order.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@alexeichhorn
alexeichhorn merged commit 89854c9 into main Oct 24, 2026
21 checks passed
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