mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-01 21:45:10 +00:00
fix(hls): apply each key tag to the wanted segments that it governs
This commit is contained in:
@@ -387,9 +387,13 @@ least one and no track is left.
|
||||
### Segment-filtering hooks
|
||||
|
||||
- **HLS**: set `track.OnSegmentFilter(segment)` to drop unwanted segments (ads/bumpers).
|
||||
A dropped segment is invisible to the whole download: unshackle ignores its `EXT-X-KEY`
|
||||
and its `EXT-X-DISCONTINUITY`, so a clear ad break inside an encrypted track does
|
||||
not disturb decryption.
|
||||
An `EXT-X-KEY` applies to each later segment until the next `EXT-X-KEY`, also when the
|
||||
filter or `--sample` drops the segment that carries it. unshackle ignores an `EXT-X-KEY` that
|
||||
applies to dropped segments only: no licence, no request and no new decryption. It also
|
||||
ignores the `EXT-X-DISCONTINUITY` of a dropped segment. A dropped ad break thus does not
|
||||
disturb decryption when the playlist repeats the `EXT-X-KEY` of the title after the break.
|
||||
Without the repeat, the segments after the break take the `EXT-X-KEY` of the ads, and
|
||||
`METHOD=NONE` there makes them clear.
|
||||
- **DASH**: pass a `period_filter` callable to `to_tracks` to drop whole periods.
|
||||
unshackle automatically drops the caching-breadth periods that some services send, and the non-`content` segment types.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user