+ Resolved conflicting dependencies by downgrading to construct 2.8.8
This commit is contained in:
parent
27c666915d
commit
887a7cd38f
|
@ -10,4 +10,4 @@ from .session import *
|
|||
from .xml_key import *
|
||||
from .xmrlicense import *
|
||||
|
||||
__version__ = "0.3.6"
|
||||
__version__ = "0.3.7"
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
from __future__ import annotations
|
||||
import collections.abc
|
||||
|
||||
# monkey patch for construct 2.8.8 compatibility
|
||||
if not hasattr(collections, 'Sequence'):
|
||||
collections.Sequence = collections.abc.Sequence
|
||||
|
||||
import base64
|
||||
from pathlib import Path
|
||||
|
|
|
@ -2,7 +2,7 @@ import base64
|
|||
from typing import Union
|
||||
from uuid import UUID
|
||||
|
||||
from construct import Struct, Int32ul, Int16ul, Array, this, Bytes, PaddedString, Switch, Int32ub, Const, Container
|
||||
from construct import Struct, Int32ul, Int16ul, Array, this, Bytes, Switch, Int32ub, Const, Container
|
||||
|
||||
from pyplayready.wrmheader import WRMHeader
|
||||
|
||||
|
@ -23,7 +23,7 @@ class _PlayreadyPSSHStructs:
|
|||
"data" / Switch(
|
||||
this.type,
|
||||
{
|
||||
1: PaddedString(this.length, "utf16")
|
||||
1: Bytes(this.length * 2)
|
||||
},
|
||||
default=Bytes(this.length)
|
||||
)
|
||||
|
@ -96,4 +96,4 @@ class PSSH:
|
|||
def _read_wrm_headers(wrm_header: Container):
|
||||
for record in wrm_header.records:
|
||||
if record.type == 1:
|
||||
yield record.data
|
||||
yield record.data.decode("utf-16-le")
|
||||
|
|
|
@ -4,7 +4,8 @@ import base64
|
|||
from pathlib import Path
|
||||
from typing import Union
|
||||
|
||||
from construct import Const, GreedyRange, Struct, Int32ub, Bytes, Int16ub, this, Switch, LazyBound, Array, Container
|
||||
from construct import Const, GreedyRange, Struct, Int32ub, Bytes, Int16ub, this, Switch, LazyBound, Array, Container, \
|
||||
If, Byte
|
||||
|
||||
|
||||
class _XMRLicenseStructs:
|
||||
|
@ -151,12 +152,12 @@ class _XMRLicenseStructs:
|
|||
"minimum_move_protection_level" / Int32ub
|
||||
)
|
||||
|
||||
XMRObject = Struct(
|
||||
XmrObject = Struct(
|
||||
"flags" / Int16ub,
|
||||
"type" / Int16ub,
|
||||
"length" / Int32ub,
|
||||
"data" / Switch(
|
||||
lambda this_: this_.type,
|
||||
lambda ctx: ctx.type,
|
||||
{
|
||||
0x0005: OutputProtectionLevelRestrictionObject,
|
||||
0x0008: AnalogVideoOutputConfigurationRestriction,
|
||||
|
@ -187,7 +188,7 @@ class _XMRLicenseStructs:
|
|||
0x005a: SecureStopRestrictionObject,
|
||||
0x0059: DigitalVideoOutputRestrictionObject
|
||||
},
|
||||
default=LazyBound(lambda: _XMRLicenseStructs.XMRObject)
|
||||
default=LazyBound(lambda ctx: _XMRLicenseStructs.XmrObject)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -195,7 +196,7 @@ class _XMRLicenseStructs:
|
|||
"signature" / Const(b"XMR\x00"),
|
||||
"xmr_version" / Int32ub,
|
||||
"rights_id" / Bytes(16),
|
||||
"containers" / GreedyRange(XMRObject)
|
||||
"containers" / GreedyRange(XmrObject)
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|||
|
||||
[tool.poetry]
|
||||
name = "pyplayready"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
description = "pyplayready CDM (Content Decryption Module) implementation in Python."
|
||||
license = "CC BY-NC-ND 4.0"
|
||||
authors = ["DevLARLEY, Erevoc", "DevataDev"]
|
||||
|
@ -33,7 +33,7 @@ include = [
|
|||
python = ">=3.8,<4.0"
|
||||
requests = "^2.32.3"
|
||||
pycryptodome = "^3.21.0"
|
||||
construct = "^2.10.70"
|
||||
construct = "2.8.8"
|
||||
ECPy = "^1.2.5"
|
||||
click = "^8.1.7"
|
||||
xmltodict = "^0.14.2"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
requests
|
||||
pycryptodome
|
||||
ecpy
|
||||
construct
|
||||
construct==2.8.8
|
||||
click
|
||||
PyYAML
|
||||
aiohttp
|
||||
|
|
Loading…
Reference in New Issue