From 707469d252ea6018a93bbca307b263ff0759922b Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Tue, 21 Feb 2023 01:37:39 +0000 Subject: [PATCH] Add ability to pass a proxy to ClearKey in HLS.get_drm --- devine/core/manifests/hls.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devine/core/manifests/hls.py b/devine/core/manifests/hls.py index ac67289..35cd322 100644 --- a/devine/core/manifests/hls.py +++ b/devine/core/manifests/hls.py @@ -199,7 +199,10 @@ class HLS: return tracks @staticmethod - def get_drm(keys: list[Union[m3u8.model.SessionKey, m3u8.model.Key]]) -> list[DRM_T]: + def get_drm( + keys: list[Union[m3u8.model.SessionKey, m3u8.model.Key]], + proxy: Optional[str] = None + ) -> list[DRM_T]: """ Convert HLS EXT-X-KEY data to initialized DRM objects. @@ -222,7 +225,7 @@ class HLS: if key.method == "NONE": return [] elif key.method == "AES-128": - drm.append(ClearKey.from_m3u_key(key)) + drm.append(ClearKey.from_m3u_key(key, proxy)) elif key.method == "ISO-23001-7": drm.append(Widevine( pssh=PSSH.new(