forked from kenzuya/unshackle
refactor(drm): build PlayReady from base64 with PlayReady.from_pssh_b64 in server keys and the wire rebuild
This commit is contained in:
@@ -23,7 +23,6 @@ from uuid import UUID
|
||||
|
||||
import click
|
||||
from langcodes import Language
|
||||
from pyplayready.system.pssh import PSSH as PlayReadyPSSH
|
||||
from pywidevine.pssh import PSSH as WidevinePSSH
|
||||
|
||||
from unshackle.core.config import config
|
||||
@@ -402,7 +401,7 @@ def pssh_drm(system: str, pssh_b64: str, kids: list[str] | None) -> Widevine | P
|
||||
kids repeats the PSSH KIDs, so kids[0] is not the track's own KID; only a PSSH without KIDs needs it.
|
||||
"""
|
||||
if system == "playready":
|
||||
return PlayReady(pssh=PlayReadyPSSH(base64.b64decode(pssh_b64)), pssh_b64=pssh_b64)
|
||||
return PlayReady.from_pssh_b64(pssh_b64)
|
||||
wv_pssh = WidevinePSSH(pssh_b64)
|
||||
return Widevine(pssh=wv_pssh, kid=kids[0] if kids and not wv_pssh.key_ids else None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user