diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-07-09 23:14:46 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-07-09 23:14:46 +0000 |
| commit | 6f8002cec40c9b53387ace05ea1f9a083acd0f3a (patch) | |
| tree | c05e60bdef768f80e7abba6b2203911b87c68c3f /lib/python/Components | |
| parent | 927c65c04c7e538a32fa81ac337f541f35eb477d (diff) | |
| download | enigma2-6f8002cec40c9b53387ace05ea1f9a083acd0f3a.tar.gz enigma2-6f8002cec40c9b53387ace05ea1f9a083acd0f3a.zip | |
just recalc length of visible entries in movie selection
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/MovieList.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py index c3ec1b16..45a34fb9 100644 --- a/lib/python/Components/MovieList.py +++ b/lib/python/Components/MovieList.py @@ -26,6 +26,12 @@ class MovieList(GUIComponent): if serviceref.flags & eServiceReference.mustDescent: return None + if len <= 0: #recalc len when not already done + cur_idx = self.l.getCurrentSelectionIndex() + x = self.list[cur_idx] + len = x[1].getLength(x[0]) #recalc the movie length... + self.list[cur_idx] = (x[0], x[1], x[2], len) #update entry in list... so next time we don't need to recalc + if len > 0: len = "%d:%02d" % (len / 60, len % 60) else: @@ -86,12 +92,6 @@ class MovieList(GUIComponent): def __len__(self): return len(self.list) - def updateLengthOfIndex(self, 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, filter_tags): # this lists our root service, then building a # nice list |
