aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/MovieList.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py
index a47741c4..2e861472 100644
--- a/lib/python/Components/MovieList.py
+++ b/lib/python/Components/MovieList.py
@@ -60,7 +60,10 @@ class MovieList(HTMLComponent, GUIComponent):
return self.instance.getCurrentIndex()
def getCurrent(self):
- return self.l.getCurrentSelection()[0]
+ l = self.l.getCurrentSelection()
+ if l is not None:
+ return self.l.getCurrentSelection()[0]
+ return None
def GUIcreate(self, parent):
self.instance = eListbox(parent)
@@ -88,9 +91,10 @@ class MovieList(HTMLComponent, GUIComponent):
return len(self.list)
def updateLengthOfIndex(self, index):
- x = self.list[index]
- self.list[index] = (x[0], x[1], x[2], x[1].getLength(x[0]))
- self.l.invalidateEntry(index)
+ if len(self.list) > index:
+ x = self.list[index]
+ self.list[index] = (x[0], x[1], x[2], x[1].getLength(x[0]))
+ self.l.invalidateEntry(index)
def load(self, root):
# this lists our root service, then building a