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:
Anna Schumaker 2019-04-23 10:44:22 -04:00
parent e116b7a784
commit e4d96755e9
2 changed files with 2 additions and 0 deletions

View File

@ -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()

View File

@ -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