def clear(self):
self.list = []
self.l.setList(self.list)
-
+ self.currPlaying = 0
+ self.oldCurrPlaying = -1
+
def GUIcreate(self, parent):
self.instance = eListbox(parent)
self.instance.setContent(self.l)
def deleteFile(self, index):
if self.currPlaying >= index:
self.currPlaying -= 1
- self.list = self.list[:index] + self.list[index + 1:]
-
+ del self.list[index]
+
def setCurrentPlaying(self, index):
self.oldCurrPlaying = self.currPlaying
self.currPlaying = index
return list
def __len__(self):
- return len(self.list)
\ No newline at end of file
+ return len(self.list)
elif choice[1] == "filelist":
self.switchToFileList()
elif choice[1] == "delete":
+ if self.playlist.getSelectionIndex() == self.playlist.getCurrentIndex():
+ self.stopEntry()
self.deleteEntry()
elif choice[1] == "clear":
self.stopEntry()
def stopEntry(self):
self.playlist.stopFile()
self.session.nav.playService(None)
+ self.updateMusicInformation(clear=True)