merge branch master

This commit is contained in:
Helmut Merz 2024-05-03 12:51:48 +02:00
commit 2f13094bbb

View file

@ -53,11 +53,6 @@ class Track(object):
else: else:
self.data.update(data) self.data.update(data)
def storeTrack(self):
"""Make changes of this track persistent by updating the corresponding row
in its container."""
self.container.update(self)
@property @property
def uid(self): def uid(self):
if self.trackId is None: if self.trackId is None:
@ -75,7 +70,17 @@ class Track(object):
def asDict(self): def asDict(self):
return dict(uid=self.uid, head=self.head, data=self.data, return dict(uid=self.uid, head=self.head, data=self.data,
timeStamp = str(self.timeStamp)[:19]) timeStamp=str(self.timeStamp)[:19])
# shortcuts for compatibility with existing software:
def updateIndex(self, **kw):
for k, v in kw.items():
self.set(k, v)
self.storeTrack()
def storeTrack(self):
self.container.update(self)
@registerContainerClass @registerContainerClass