mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 15:35:06 +00:00
fix(manifests): decode audio channels by scheme in dash, hls and ism
DASH reads the AudioChannelConfiguration scheme (Dolby mask, CICP index incl. immersive layouts, channel count); HLS and ISM counts map 6/7/8 to 5.1/6.1/7.1.
This commit is contained in:
@@ -388,9 +388,6 @@ class EXAMPLE(Service):
|
||||
# Drop "clear"/unencrypted decoy renditions the API sometimes returns.
|
||||
tracks.audio = [a for a in tracks.audio if "clear" not in (a.data["dash"]["representation"].get("id") or "")]
|
||||
for audio in tracks.audio:
|
||||
# Normalize odd channel counts (6.0 -> 5.1) for correct filename tokens.
|
||||
if audio.channels == 6.0:
|
||||
audio.channels = 5.1
|
||||
# Mark descriptive / audio-description tracks from the AdaptationSet label.
|
||||
label = audio.data["dash"]["adaptation_set"].get("label") or ""
|
||||
if "Audio Description" in label or "description" in label.lower():
|
||||
|
||||
Reference in New Issue
Block a user