X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/1c041a12021d9b29334c5a409fcc9e07dfcca1bc..02172ca65853b9f61d46c0e5e7823ee69f203b83:/lib/python/Components/MovieList.py diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py index a47741c4..3b7e7e36 100644 --- a/lib/python/Components/MovieList.py +++ b/lib/python/Components/MovieList.py @@ -60,7 +60,8 @@ class MovieList(HTMLComponent, GUIComponent): return self.instance.getCurrentIndex() def getCurrent(self): - return self.l.getCurrentSelection()[0] + l = self.l.getCurrentSelection() + return l and l[0] def GUIcreate(self, parent): self.instance = eListbox(parent) @@ -88,9 +89,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