curds: Use sort keys for inserting playlist nodes
This is slower, but puts things in their right place. Implementing a bisect search should help speed this up. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
48edd46446
commit
53ae9ccb6c
|
@ -77,7 +77,7 @@ class PlaylistNode:
|
|||
|
||||
def insert_child(self, child):
|
||||
for i, n in enumerate(self.children):
|
||||
if child < n:
|
||||
if child.sort_key() < n.sort_key():
|
||||
return self.__insert_node__(child, i)
|
||||
return self.append_child(child)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user