diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-04-03 08:12:07 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-04-03 08:12:07 +0000 |
| commit | 2cacfb04d1bff4047534b63618c3744346f65fd5 (patch) | |
| tree | 5d5057dc47f9daaa50a17dee1838322cc4afac50 /lib/python/Screens/MovieSelection.py | |
| parent | af5dfb0ec911f152f909530cf29c9e2ba74e2c1f (diff) | |
| download | enigma2-2cacfb04d1bff4047534b63618c3744346f65fd5.tar.gz enigma2-2cacfb04d1bff4047534b63618c3744346f65fd5.zip | |
faster loading of movie list (done by initially not loading the file length and updating the file lengths after displaying the list in the background
(timer driven))
Diffstat (limited to 'lib/python/Screens/MovieSelection.py')
| -rw-r--r-- | lib/python/Screens/MovieSelection.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/python/Screens/MovieSelection.py b/lib/python/Screens/MovieSelection.py index 17da5ff3..91620ea2 100644 --- a/lib/python/Screens/MovieSelection.py +++ b/lib/python/Screens/MovieSelection.py @@ -77,6 +77,7 @@ class MovieSelection(Screen): self["waitingtext"] = Label(_("Please wait... Loading list...")) self["list"] = MovieList(None) + self.list = self["list"] self.selectedmovie = selectedmovie #self["okbutton"] = Button("ok", [self.channelSelected]) @@ -91,6 +92,9 @@ class MovieSelection(Screen): self["actions"].csel = self self.onShown.append(self.go) + self.lengthTimer = eTimer() + self.lengthTimer.timeout.get().append(self.updateLengthData) + def go(self): # ouch. this should redraw our "Please wait..."-text. # this is of course not the right way to do this. @@ -103,6 +107,16 @@ class MovieSelection(Screen): self["waitingtext"].instance.hide() self["freeDiskSpace"].update() + + self.lengthTimer.start(10, 1) + self.lengthPosition = 0 + self.lengthLength = len(self["list"]) + + def updateLengthData(self): + self.list.updateLengthOfIndex(self.lengthPosition) + self.lengthPosition += 1 + if self.lengthPosition < self.lengthLength: + self.lengthTimer.start(10, 1) def moveTo(self): self["list"].moveTo(self.selectedmovie) |
