X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/1557c715e461d5a7deb04bb008c6497441351bbe..f925e1fc04e179b6626c47170700159ae4212d93:/lib/python/Components/Sources/CurrentService.py diff --git a/lib/python/Components/Sources/CurrentService.py b/lib/python/Components/Sources/CurrentService.py index 08d67eee..acc624a2 100644 --- a/lib/python/Components/Sources/CurrentService.py +++ b/lib/python/Components/Sources/CurrentService.py @@ -1,8 +1,7 @@ from Components.PerServiceDisplay import PerServiceBase from enigma import iPlayableService from Source import Source - -from time import time +from Components.Element import cached class CurrentService(PerServiceBase, Source): def __init__(self, navcore): @@ -15,16 +14,16 @@ class CurrentService(PerServiceBase, Source): # which is not always provided. iPlayableService.evUpdatedInfo: self.serviceEvent, iPlayableService.evUpdatedEventInfo: self.serviceEvent, - iPlayableService.evCuesheetChanged: self.serviceEvent + iPlayableService.evCuesheetChanged: self.serviceEvent, + iPlayableService.evVideoSizeChanged: self.serviceEvent }, with_event=True) self.navcore = navcore def serviceEvent(self, event): self.changed((self.CHANGED_SPECIFIC, event)) + @cached def getCurrentService(self): - if self.cache is None: - self.cache = self.navcore.getCurrentService() - return self.cache + return self.navcore.getCurrentService() service = property(getCurrentService)