From 09989f8b949322c0d28c154b1a6db682529487d0 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Tue, 21 Feb 2023 01:31:52 +0000 Subject: [PATCH] Raise error if no supported drm was found in HLS.get_drm --- devine/core/manifests/hls.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devine/core/manifests/hls.py b/devine/core/manifests/hls.py index 1807354..cabbf22 100644 --- a/devine/core/manifests/hls.py +++ b/devine/core/manifests/hls.py @@ -201,6 +201,7 @@ class HLS: @staticmethod def get_drm(keys: list[Union[m3u8.model.SessionKey, m3u8.model.Key]]) -> list[DRM_T]: drm = [] + unsupported_systems = [] for key in keys: if not key: @@ -217,6 +218,11 @@ class HLS: pssh=PSSH(key.uri.split(",")[-1]), **key._extra_params # noqa )) + else: + unsupported_systems.append(key.method + (f" ({key.keyformat})" if key.keyformat else "")) + + if not drm and unsupported_systems: + raise NotImplementedError(f"No support for any of the key systems: {', '.join(unsupported_systems)}") return drm