From 3d5ee66a7e80c61e431e74e821242e144e88f008 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sun, 13 Nov 2005 08:57:45 +0000 Subject: dont open epglist when no epg is avail --- lib/python/Screens/ChannelSelection.py | 9 +++++++-- lib/python/Screens/InfoBar.py | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index b30190e4..c31b7949 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -3,7 +3,7 @@ from Components.Button import Button from Components.ServiceList import ServiceList from Components.ActionMap import ActionMap from EpgSelection import EPGSelection -from enigma import eServiceReference +from enigma import eServiceReference, eEPGCache, eEPGCachePtr from Screens.FixedMenu import FixedMenu @@ -87,7 +87,12 @@ class ChannelSelection(Screen): self["actions"].csel = self def showEPGList(self): - self.session.open(EPGSelection, self["list"].getCurrent()) + ref=self["list"].getCurrent() + ptr=eEPGCache.getInstance() + if ptr.startTimeQuery(ref) != -1: + self.session.open(EPGSelection, ref) + else: + print 'no epg for service', ref.toString() # marked edit mode def startMarkedEdit(self): diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 62639c04..78a47ddd 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -224,7 +224,12 @@ class InfoBar(Screen): self.muteDialog.instance.hide() def showEPGList(self): - self.session.open(EPGSelection, self.session.nav.getCurrentlyPlayingServiceReference()) + ref=self.session.nav.getCurrentlyPlayingServiceReference() + ptr=eEPGCache.getInstance() + if ptr.startTimeQuery(ref) != -1: + self.session.open(EPGSelection, ref) + else: + print 'no epg for service', ref.toString() def quit(self): self.session.open(Standby) -- cgit v1.2.3