aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/MediaPlayer.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/python/Components/MediaPlayer.py b/lib/python/Components/MediaPlayer.py
index 31799c5b..31406e49 100644
--- a/lib/python/Components/MediaPlayer.py
+++ b/lib/python/Components/MediaPlayer.py
@@ -63,7 +63,9 @@ class PlayList(HTMLComponent, GUIComponent, MenuList):
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)
@@ -81,8 +83,8 @@ class PlayList(HTMLComponent, GUIComponent, MenuList):
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
@@ -121,4 +123,4 @@ class PlayList(HTMLComponent, GUIComponent, MenuList):
return list
def __len__(self):
- return len(self.list) \ No newline at end of file
+ return len(self.list)