From 7e707a6d12fdd6eff92dc2e5ff733f1446cadd62 Mon Sep 17 00:00:00 2001 From: larley <121249322+DevLARLEY@users.noreply.github.com> Date: Sun, 5 Oct 2025 17:00:11 +0200 Subject: [PATCH] + Fixed RevList conversion --- pyplayready/__init__.py | 2 +- pyplayready/cdm.py | 9 +++++++-- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pyplayready/__init__.py b/pyplayready/__init__.py index 546c7b6..a979c85 100644 --- a/pyplayready/__init__.py +++ b/pyplayready/__init__.py @@ -16,4 +16,4 @@ from pyplayready.misc.revocation_list import * from pyplayready.misc.storage import * -__version__ = "0.8.0" +__version__ = "0.8.1" diff --git a/pyplayready/cdm.py b/pyplayready/cdm.py index fafe5cf..eda1b8a 100644 --- a/pyplayready/cdm.py +++ b/pyplayready/cdm.py @@ -159,8 +159,13 @@ class Cdm: else: new_rev_info = licence.rev_info - Storage.write_file(RevocationList.CurrentRevListStorageName, new_rev_info) - Storage.write_file(RevocationList.loads(new_rev_info).get_storage_file_name(), new_rev_info) + new_rev_info_xml = ET.tostring( + new_rev_info, + xml_declaration=True, + encoding="utf-8" + ) + Storage.write_file(RevocationList.CurrentRevListStorageName, new_rev_info_xml) + Storage.write_file(RevocationList.loads(new_rev_info).get_storage_file_name(), new_rev_info_xml) for xmr_license in licence.licenses: session.keys.append(xmr_license.get_content_key(session.encryption_key)) diff --git a/pyproject.toml b/pyproject.toml index 64f12b3..fbf66c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pyplayready" -version = "0.8.0" +version = "0.8.1" description = "pyplayready CDM (Content Decryption Module) implementation in Python." license = "CC BY-NC-ND 4.0" authors = ["DevLARLEY, Erevoc", "DevataDev"]