Fix index returned by playlist.insert
This commit is contained in:
parent
260e9ecdc1
commit
22144c6fc3
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ class Playlist:
|
||||||
return position
|
return position
|
||||||
elif before >= 0:
|
elif before >= 0:
|
||||||
self.waiting.insert(before, element)
|
self.waiting.insert(before, element)
|
||||||
return before
|
return min(before, len(self.waiting) - 1)
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue