mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-01-18 00:31:39 +00:00
Changed extra_[to|from]_dict to session save/restore
This commit is contained in:
parent
b9aad5ac08
commit
5aa2560c7c
@ -553,7 +553,7 @@ class DefaultSegment:
|
||||
r = r.get_indexed[other.order]
|
||||
return r
|
||||
|
||||
def serialize_extra_to_dict(self, mdict):
|
||||
def save_session(self, mdict):
|
||||
"""Save extra metadata to a dict so that it can be serialized
|
||||
|
||||
This is not saved by __getstate__ because child segments will point to
|
||||
@ -573,7 +573,7 @@ class DefaultSegment:
|
||||
# pairs
|
||||
mdict["comments"] = self.get_sorted_comments()
|
||||
|
||||
def restore_extra_from_dict(self, e):
|
||||
def restore_session(self, e):
|
||||
if 'comments' in e:
|
||||
for k, v in e['comments']:
|
||||
self.rawdata.extra.comments[k] = v
|
||||
|
Loading…
x
Reference in New Issue
Block a user