aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-18 15:17:17 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-18 15:17:17 +0000
commit37f07c233166d0be348a7479be6eb59ceb010328 (patch)
tree18ca11714ca823703eb30d7fe05b3bfae651e55c /lib
parent2a4e5e2d7e124dc7fe0de1a12f0fc2f7cd3def6d (diff)
downloadenigma2-37f07c233166d0be348a7479be6eb59ceb010328.tar.gz
enigma2-37f07c233166d0be348a7479be6eb59ceb010328.zip
get now/next info from epgcache on evtStart... update infos when the real
now/next table is received
Diffstat (limited to 'lib')
-rw-r--r--lib/python/Components/Sources/EventInfo.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/python/Components/Sources/EventInfo.py b/lib/python/Components/Sources/EventInfo.py
index a4bc874f..f3fd6e88 100644
--- a/lib/python/Components/Sources/EventInfo.py
+++ b/lib/python/Components/Sources/EventInfo.py
@@ -1,9 +1,8 @@
from Components.PerServiceDisplay import PerServiceBase
from Components.Element import cached
-from enigma import iPlayableService
+from enigma import iPlayableService, iServiceInformation, eServiceReference, eEPGCache
from Source import Source
-
class EventInfo(PerServiceBase, Source, object):
NOW = 0
NEXT = 1
@@ -16,19 +15,23 @@ class EventInfo(PerServiceBase, Source, object):
iPlayableService.evUpdatedEventInfo: self.gotEvent,
iPlayableService.evEnd: self.gotEvent
}, with_event=True)
-
self.now_or_next = now_or_next
+ self.epgQuery = eEPGCache.getInstance().lookupEventTime
@cached
def getEvent(self):
service = self.navcore.getCurrentService()
info = service and service.info()
- return info and info.getEvent(self.now_or_next)
+ ret = info and info.getEvent(self.now_or_next)
+ if not ret and info:
+ refstr = info.getInfoString(iServiceInformation.sServiceref)
+ ret = self.epgQuery(eServiceReference(refstr), -1, self.now_or_next and 1 or 0)
+ return ret
event = property(getEvent)
def gotEvent(self, what):
- if what in [iPlayableService.evStart, iPlayableService.evEnd]:
+ if what == iPlayableService.evEnd:
self.changed((self.CHANGED_CLEAR,))
else:
self.changed((self.CHANGED_ALL,))