diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-04-03 14:44:28 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-04-03 14:44:28 +0000 |
| commit | fc94d22d03cd9e7c24977257cbec912ad72c79da (patch) | |
| tree | c72291552fe08238b9ef9415c73f5e59528f7abf /lib/python/Components/MovieList.py | |
| parent | 76fdfb7ae5768596a8916b272fe980d03e0a9630 (diff) | |
| download | enigma2-fc94d22d03cd9e7c24977257cbec912ad72c79da.tar.gz enigma2-fc94d22d03cd9e7c24977257cbec912ad72c79da.zip | |
length check
Diffstat (limited to 'lib/python/Components/MovieList.py')
| -rw-r--r-- | lib/python/Components/MovieList.py | 12 |
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 |
