aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/MediaPlayer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/Components/MediaPlayer.py b/lib/python/Components/MediaPlayer.py
index 45551ccc..b2cb4eb5 100644
--- a/lib/python/Components/MediaPlayer.py
+++ b/lib/python/Components/MediaPlayer.py
@@ -57,7 +57,7 @@ class PlayList(MenuList, HTMLComponent, GUIComponent):
self.list = []
self.l.setList(self.list)
self.l.setFont(0, gFont("Regular", 18))
- self.currPlaying = 0
+ self.currPlaying = -1
self.oldCurrPlaying = -1
def clear(self):
@@ -91,6 +91,8 @@ 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)