feat: add delete function

This commit is contained in:
Terry Geng
2020-03-20 00:09:07 +08:00
parent c04a83c37c
commit 7f29deba01
6 changed files with 67 additions and 40 deletions

View File

@ -268,9 +268,9 @@ class OneshotPlaylist(BasePlaylist):
return self
def next(self):
self.version += 1
if len(self) > 0:
self.version += 1
if self.current_index != -1:
super().__delitem__(self.current_index)
if len(self) == 0: