merge branch master
This commit is contained in:
commit
2f13094bbb
1 changed files with 11 additions and 6 deletions
|
@ -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:
|
||||||
|
@ -77,6 +72,16 @@ class Track(object):
|
||||||
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
|
||||||
class Container(object):
|
class Container(object):
|
||||||
|
|
Loading…
Add table
Reference in a new issue