X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/aa3e781f31a04223416f0a34b25ab95fc0bef429..9bd3ea792c8fe3dd3137dc7dc6598eb17c6ab99a:/lib/python/Components/EventInfo.py diff --git a/lib/python/Components/EventInfo.py b/lib/python/Components/EventInfo.py index 125310be..c8e5a13f 100644 --- a/lib/python/Components/EventInfo.py +++ b/lib/python/Components/EventInfo.py @@ -1,5 +1,7 @@ from PerServiceDisplay import * +from enigma import iServiceInformationPtr, eServiceEventPtr + class EventInfo(PerServiceDisplay): Now = 0 Next = 1 @@ -21,14 +23,14 @@ class EventInfo(PerServiceDisplay): service = self.navcore.getCurrentService() if service != None: - if not service.info(info): - ev = eServiceEventPtr() - if info.getEvent(ev, self.now_or_next & 1) == 0: + info = service.info() + if info is not None: + ev = info.getEvent(self.now_or_next & 1) + if ev is not None: if self.now_or_next & 2: self.setText("%d min" % (ev.m_duration / 60)) else: self.setText(ev.m_event_name) - print "new event info in EventInfo! yeah!" def stopEvent(self): self.setText(