git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dvd hotplug: stop assuming dvd for every other medium. in case of multiple ISO...
[enigma2.git]
/
lib
/
python
/
Components
/
Sources
/
EventInfo.py
diff --git
a/lib/python/Components/Sources/EventInfo.py
b/lib/python/Components/Sources/EventInfo.py
index 40269993565795e476da47009ccbbf9138ed045b..5af0bf9740372e7653962e31c30d48afc1cb73dc 100644
(file)
--- a/
lib/python/Components/Sources/EventInfo.py
+++ b/
lib/python/Components/Sources/EventInfo.py
@@
-1,6
+1,6
@@
from Components.PerServiceDisplay import PerServiceBase
from Components.PerServiceDisplay import PerServiceBase
-from
Tools.Event import Event
-from enigma import iPlayableService
+from
Components.Element import cached
+from enigma import iPlayableService
, iServiceInformation, eServiceReference, eEPGCache
from Source import Source
class EventInfo(PerServiceBase, Source, object):
from Source import Source
class EventInfo(PerServiceBase, Source, object):
@@
-11,16
+11,32
@@
class EventInfo(PerServiceBase, Source, object):
Source.__init__(self)
PerServiceBase.__init__(self, navcore,
{
Source.__init__(self)
PerServiceBase.__init__(self, navcore,
{
- iPlayableService.evStart: self.changed,
- iPlayableService.evUpdatedEventInfo: self.changed,
- iPlayableService.evEnd: self.changed
- })
-
+ iPlayableService.evStart: self.gotEvent,
+ iPlayableService.evUpdatedEventInfo: self.gotEvent,
+ iPlayableService.evEnd: self.gotEvent
+ }, with_event=True)
self.now_or_next = now_or_next
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()
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)
event = property(getEvent)
+
+ def gotEvent(self, what):
+ if what == iPlayableService.evEnd:
+ self.changed((self.CHANGED_CLEAR,))
+ else:
+ self.changed((self.CHANGED_ALL,))
+
+ def destroy(self):
+ PerServiceBase.destroy(self)
+ Source.destroy(self)
+