diff --git a/legendary/models/manifest.py b/legendary/models/manifest.py index c43cc39..28ea004 100644 --- a/legendary/models/manifest.py +++ b/legendary/models/manifest.py @@ -118,10 +118,10 @@ class Manifest: _manifest.version = struct.unpack(' 0: _meta._build_id = read_fstring(bio) - if bio.tell() != _meta.meta_size: - raise ValueError('Did not read entire meta!') + if (size_read := bio.tell()) != _meta.meta_size: + logger.warning(f'Did not read entire manifest metadata! Version: {_meta.data_version}, ' + f'{_meta.meta_size - size_read} bytes missing, skipping...') + bio.seek(_meta.meta_size - size_read, 1) + # downgrade version to prevent issues during serialisation + _meta.data_version = 0 return _meta @@ -366,8 +370,12 @@ class CDL: for chunk in _cdl.elements: chunk.file_size = struct.unpack('