beautify and enhance web interface, debug

This commit is contained in:
Terry Geng
2020-02-04 23:30:56 +08:00
parent a8517f0c9f
commit abd5eb8e95
6 changed files with 132 additions and 71 deletions

View File

@ -8,6 +8,15 @@ class PlayList:
def append(self, item):
self.playlist.append(item)
def insert(self, index, item):
if index == -1:
index = self.current_index
self.playlist.insert(index, item)
if index <= self.current_index:
self.current_index += 1
def length(self):
return len(self.playlist)