curds: Make sure PlaylistNode ids are still mapped after a reset
This is mostly in case the node map gets cleared at some point during testing. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
e116b7a784
commit
e4d96755e9
|
@ -96,6 +96,7 @@ class PlaylistNode:
|
|||
return None
|
||||
|
||||
def reset(self):
|
||||
nodes[id(self)] = self
|
||||
for child in self.children:
|
||||
del nodes[id(child)]
|
||||
self.children.clear()
|
||||
|
|
|
@ -76,6 +76,7 @@ class Playlist(node.PlaylistNode):
|
|||
return res
|
||||
|
||||
def reset(self):
|
||||
node.PlaylistNode.reset(self)
|
||||
self.list.clear()
|
||||
self.current = -1
|
||||
self.loop = False
|
||||
|
|
Loading…
Reference in New Issue