aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-11-13 01:16:45 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-11-13 01:16:45 +0000
commitd09071a7547fdff66a2ac20e0ad6bdce0a072ab4 (patch)
treec76d3a57fb6d5c31b3ee23ed807f7ab0ba10c689
parent4fca544271de6b42f57ccb02e6a8686a39502d4b (diff)
downloadenigma2-d09071a7547fdff66a2ac20e0ad6bdce0a072ab4.tar.gz
enigma2-d09071a7547fdff66a2ac20e0ad6bdce0a072ab4.zip
fix bluescreen when playing a file while playlist is empty
-rw-r--r--lib/python/Components/MediaPlayer.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/python/Components/MediaPlayer.py b/lib/python/Components/MediaPlayer.py
index b2cb4eb5..d88b6280 100644
--- a/lib/python/Components/MediaPlayer.py
+++ b/lib/python/Components/MediaPlayer.py
@@ -63,7 +63,7 @@ class PlayList(MenuList, HTMLComponent, GUIComponent):
def clear(self):
del self.list[:]
self.l.setList(self.list)
- self.currPlaying = 0
+ self.currPlaying = -1
self.oldCurrPlaying = -1
GUI_WIDGET = eListbox
@@ -91,11 +91,10 @@ class PlayList(MenuList, HTMLComponent, GUIComponent):
self.currPlaying = index
def updateState(self, state):
- if self.currPlaying == -1:
- return
if len(self.list) > self.oldCurrPlaying and self.oldCurrPlaying != -1:
self.list[self.oldCurrPlaying] = PlaylistEntryComponent(self.list[self.oldCurrPlaying][0], STATE_NONE)
- self.list[self.currPlaying] = PlaylistEntryComponent(self.list[self.currPlaying][0], state)
+ if self.currPlaying != -1 and self.currPlaying < len(self.list):
+ self.list[self.currPlaying] = PlaylistEntryComponent(self.list[self.currPlaying][0], state)
self.updateList()
def playFile(self):