aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-01-20 01:12:10 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-01-20 01:12:10 +0000
commit047a5a85f0cfacfa39d86f66e806e05d26be7a8c (patch)
tree46cb30aaa037df3be9052473ebdad547cc2709a6 /lib
parentaefd1352a034ae625dff039e77ed176647305087 (diff)
downloadenigma2-047a5a85f0cfacfa39d86f66e806e05d26be7a8c.tar.gz
enigma2-047a5a85f0cfacfa39d86f66e806e05d26be7a8c.zip
small speedup
Diffstat (limited to 'lib')
-rw-r--r--lib/python/Components/EpgList.py14
-rw-r--r--lib/python/Screens/ChannelSelection.py4
2 files changed, 3 insertions, 15 deletions
diff --git a/lib/python/Components/EpgList.py b/lib/python/Components/EpgList.py
index 38400945..4444d3b5 100644
--- a/lib/python/Components/EpgList.py
+++ b/lib/python/Components/EpgList.py
@@ -197,10 +197,7 @@ class EPGList(HTMLComponent, GUIComponent):
def fillMultiEPG(self, services, stime=-1):
t = time()
- test = [ '0RIBDTCn' ]
- for service in services:
- tuple = (service.ref.toString(), 0, stime)
- test.append( tuple )
+ test = [ '0RIBDTCn', (service.ref.toString(), 0, stime) for service in services ]
self.list = self.queryEPG(test)
self.l.setList(self.list)
print time() - t
@@ -208,14 +205,7 @@ class EPGList(HTMLComponent, GUIComponent):
def updateMultiEPG(self, direction):
t = time()
- test = [ 'RIBDTCn' ]
- for x in self.list:
- service = x[1]
- begTime = x[3]
- duration = x[4]
- if begTime is None:
- begTime = 0
- test.append((service, direction, begTime))
+ test = [ 'RIBDTCn', x[3] and (x[1], x[4], x[3]) or (x[1], x[4], 0) for x in self.list ]
tmp = self.queryEPG(test)
cnt=0
for x in tmp:
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
index 78478374..5a0f1177 100644
--- a/lib/python/Screens/ChannelSelection.py
+++ b/lib/python/Screens/ChannelSelection.py
@@ -36,9 +36,7 @@ class BouquetSelector(Screen):
"ok": self.okbuttonClick,
"cancel": self.cancelClick
})
- entrys = [ ]
- for x in bouquets:
- entrys.append((x[0], x[1]))
+ entrys = [ (x[0], x[1]) for x in bouquets ]
self["menu"] = MenuList(entrys, enableWrapAround)
def getCurrent(self):