From 93d9561fac8004304d6cf76bcaf9b0aa34d6c0c5 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sat, 6 Aug 2022 09:01:03 +0100 Subject: [PATCH] serve: Use Cdm.get_keys() instead of accessing _sessions --- pywidevine/serve.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pywidevine/serve.py b/pywidevine/serve.py index b7d3cfe..0a8227b 100644 --- a/pywidevine/serve.py +++ b/pywidevine/serve.py @@ -294,8 +294,7 @@ async def parse_license(request: web.Request) -> web.Response: "type": key.type, "permissions": key.permissions, } - for key in cdm._sessions[session_id].keys - if not key_type or key.type == key_type + for key in cdm.get_keys(session_id, key_type) ] return web.json_response({