forked from organicmaps/organicmaps
[python] Add mwm v10 version to pygen. Do not parse metadata_offsets from python for mwm v10 and newer.
This commit is contained in:
parent
3e8ca5a1ae
commit
247005717e
2 changed files with 4 additions and 1 deletions
|
@ -348,6 +348,7 @@ BOOST_PYTHON_MODULE(pygen)
|
|||
.value("v7", version::Format::v7)
|
||||
.value("v8", version::Format::v8)
|
||||
.value("v9", version::Format::v9)
|
||||
.value("v10", version::Format::v10)
|
||||
.value("last", version::Format::lastFormat);
|
||||
|
||||
bp::class_<FilesContainerR::TagInfo>("SectionInfo", bp::no_init)
|
||||
|
|
|
@ -34,7 +34,8 @@ class MwmPython(mi.Mwm):
|
|||
self.map_type = mi.MapType(read_varint(self.file))
|
||||
|
||||
self.version_ = self._read_version()
|
||||
self.metadata_offsets = self._read_metadata_offsets()
|
||||
if self.version_.format < 10 :
|
||||
self.metadata_offsets = self._read_metadata_offsets()
|
||||
|
||||
def version(self) -> mi.MwmVersion:
|
||||
return self.version_
|
||||
|
@ -88,6 +89,7 @@ class MwmPython(mi.Mwm):
|
|||
return tags
|
||||
|
||||
def _read_metadata_offsets(self) -> Dict[int, int]:
|
||||
assert self.version_.format < 10
|
||||
self.seek_tag("metaidx")
|
||||
tag_info = self.get_tag("metaidx")
|
||||
current = 0
|
||||
|
|
Loading…
Add table
Reference in a new issue