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:
imSp4rky
2026-10-30 23:22:47 -06:00
parent 23545b6c92
commit 97711e799c
7 changed files with 160 additions and 21 deletions
-3
View File
@@ -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():