From 5ca2f256d52d79531db990b989f744a0d162c1d4 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Tue, 9 May 2023 13:04:20 +0100 Subject: [PATCH] Fix URL used on final chance to get Track KID on DASH downloads segments[0] is the first tuple, of two values. The URL and an optional byte range. So this accidentally passed the tuple rather than the URL within the tuple. Fixes #54 --- devine/core/manifests/dash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devine/core/manifests/dash.py b/devine/core/manifests/dash.py index 1149e47..f7fb368 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -448,8 +448,8 @@ class DASH: log.warning("No Widevine PSSH was found for this track, is it DRM free?") if track.drm: - # last chance to find the KID - track_kid = track_kid or track.get_key_id(url=segments[0], session=session) + # last chance to find the KID, assumes first segment will hold the init data + track_kid = track_kid or track.get_key_id(url=segments[0][0], session=session) # license and grab content keys drm = track.drm[0] # just use the first supported DRM system for now if isinstance(drm, Widevine):