From 188224c032f898f7ddbb347839baba65550b5903 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 3 Dec 2008 18:05:47 +0100 Subject: GraphMultiEpg: fix zap to services without events --- lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py index 7f422c96..aff1c91d 100644 --- a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py +++ b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py @@ -93,13 +93,13 @@ class EPGList(HTMLComponent, GUIComponent): return event def getCurrent(self): - if self.cur_service is None or self.cur_event is None: + if self.cur_service is None: return ( None, None ) old_service = self.cur_service #(service, service_name, events) events = self.cur_service[2] refstr = self.cur_service[0] - if not events or not len(events): - return ( None, None ) + if self.cur_event is None or not events or not len(events): + return ( None, ServiceReference(refstr) ) event = events[self.cur_event] #(event_id, event_title, begin_time, duration) eventid = event[0] service = ServiceReference(refstr) -- cgit v1.2.3 From 1e1b651652e0f46bebc1c803e289fb84de222690 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 3 Dec 2008 19:05:33 +0100 Subject: GraphMultiEpg.py: better readable code (no functional change) --- .../Extensions/GraphMultiEPG/GraphMultiEpg.py | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py index aff1c91d..441cb5d8 100644 --- a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py +++ b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py @@ -204,7 +204,13 @@ class EPGList(HTMLComponent, GUIComponent): def buildEntry(self, service, service_name, events): r1=self.service_rect r2=self.event_rect - res = [ None, MultiContentEntryText(pos = (r1.left(),r1.top()), size = (r1.width(), r1.height()), font = 0, flags = RT_HALIGN_LEFT | RT_VALIGN_CENTER, text = service_name, color = self.foreColorService, backcolor = self.backColorService) ] + res = [ None, MultiContentEntryText( + pos = (r1.left(),r1.top()), + size = (r1.width(), r1.height()), + font = 0, flags = RT_HALIGN_LEFT | RT_VALIGN_CENTER, + text = service_name, + color = self.foreColorService, + backcolor = self.backColorService) ] if events: start = self.time_base+self.offs*self.time_epoch*60 @@ -222,9 +228,16 @@ class EPGList(HTMLComponent, GUIComponent): for ev in events: #(event_id, event_title, begin_time, duration) rec=ev[2] and self.timer.isInTimer(ev[0], ev[2], ev[3], service) > ((ev[3]/10)*8) xpos, ewidth = self.calcEntryPosAndWidthHelper(ev[2], ev[3], start, end, width) - res.append(MultiContentEntryText(pos = (left+xpos, top), size = (ewidth, height), font = 1, flags = RT_HALIGN_CENTER | RT_VALIGN_CENTER | RT_WRAP, text = ev[1], color = foreColor, color_sel = foreColorSelected, backcolor = backColor, backcolor_sel = backColorSelected, border_width = 1, border_color = borderColor)) + res.append(MultiContentEntryText( + pos = (left+xpos, top), size = (ewidth, height), + font = 1, flags = RT_HALIGN_CENTER | RT_VALIGN_CENTER | RT_WRAP, + text = ev[1], color = foreColor, color_sel = foreColorSelected, + backcolor = backColor, backcolor_sel = backColorSelected, border_width = 1, border_color = borderColor)) if rec and ewidth > 23: - res.append(MultiContentEntryPixmapAlphaTest(pos = (left+xpos+ewidth-22, top+height-22), size = (21, 21), png = self.clock_pixmap, backcolor = backColor, backcolor_sel = backColorSelected)) + res.append(MultiContentEntryPixmapAlphaTest( + pos = (left+xpos+ewidth-22, top+height-22), size = (21, 21), + png = self.clock_pixmap, backcolor = backColor, + backcolor_sel = backColorSelected)) return res def selEntry(self, dir, visible=True): @@ -278,8 +291,13 @@ class EPGList(HTMLComponent, GUIComponent): self.time_base = int(stime) test = [ (service.ref.toString(), 0, self.time_base, self.time_epoch) for service in services ] test.insert(0, 'XRnITBD') + print "BEFORE:" + for x in test: + print x epg_data = self.queryEPG(test) - + print "EPG:" + for x in epg_data: + print x self.list = [ ] tmp_list = None service = "" -- cgit v1.2.3 From 282d9e86ee6942a5c557d25cce0899857fab78dd Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 3 Dec 2008 19:06:21 +0100 Subject: GraphMultiEpg/plugin.py: fix not working zap function when the bouquet is changed with bouquet +/- --- lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py index 0ebcafca..adb7015d 100644 --- a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py +++ b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py @@ -69,6 +69,7 @@ def changeBouquetCB(direction, epg): bouquet = bouquetSel.getCurrent() services = getBouquetServices(bouquet) if len(services): + global epg_bouquet epg_bouquet = bouquet epg.setServices(services) -- cgit v1.2.3