revert local change
[enigma2.git] / lib / python / Components / Sources / CurrentService.py
index 08d67ee..8e582d5 100644 (file)
@@ -1,6 +1,7 @@
 from Components.PerServiceDisplay import PerServiceBase
 from enigma import iPlayableService
 from Source import Source
+from Components.Element import cached
 
 from time import time
 
@@ -15,16 +16,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)