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
This commit is contained in:
rlaphoenix 2023-05-09 13:04:20 +01:00
parent 1668647e4d
commit 5ca2f256d5
1 changed files with 2 additions and 2 deletions

View File

@ -448,8 +448,8 @@ class DASH:
log.warning("No Widevine PSSH was found for this track, is it DRM free?") log.warning("No Widevine PSSH was found for this track, is it DRM free?")
if track.drm: if track.drm:
# last chance to find the KID # 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], session=session) track_kid = track_kid or track.get_key_id(url=segments[0][0], session=session)
# license and grab content keys # license and grab content keys
drm = track.drm[0] # just use the first supported DRM system for now drm = track.drm[0] # just use the first supported DRM system for now
if isinstance(drm, Widevine): if isinstance(drm, Widevine):