From f2174dfa725873f7da87fde6bfe5fe00fdcd7d7a Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Thu, 21 Jul 2022 16:21:22 +0100 Subject: [PATCH] Device: Blank flags on v1 WVDs when migrating This flag was technically used before this project and to ensure it will be unused and ready for safe use in this project and on v3 (if/when), we should blank the flags. --- pywidevine/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pywidevine/device.py b/pywidevine/device.py index 30362bc..d158bc5 100644 --- a/pywidevine/device.py +++ b/pywidevine/device.py @@ -6,7 +6,7 @@ from enum import Enum from pathlib import Path from typing import Any, Optional, Union -from construct import BitStruct, Bytes, Const, ConstructError +from construct import BitStruct, Bytes, Const, ConstructError, Container from construct import Enum as CEnum from construct import Int8ub, Int16ub from construct import Optional as COptional @@ -184,6 +184,7 @@ class Device: if header.version == 1: # v1 to v2 data = _Structures.v1.parse(data) data.version = 2 # update version to 2 to allow loading + data.flags = Container() # blank flags that may have been used in v1 vmp = FileHashes() if data.vmp: