do not restart previous tv service when leave standby
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index 571947915f0ec37d3b97d78e4168fbde82272491..9b3c5cf4771a420847312dd868a1f5b725e27160 100644 (file)
@@ -860,25 +860,28 @@ class InfoBarSeek:
 from Screens.PVRState import PVRState, TimeshiftState
 
 class InfoBarPVRState:
-       def __init__(self, screen=PVRState, show_always=False):
-               self.show_always = show_always
+       def __init__(self, screen=PVRState):
                self.onPlayStateChanged.append(self.__playStateChanged)
                self.pvrStateDialog = self.session.instantiateDialog(screen)
-               self.onShow.append(self.__mayShow)
+               self.onShow.append(self._mayShow)
                self.onHide.append(self.pvrStateDialog.hide)
-       
-       def __mayShow(self):
-               if self.execing and (self.show_always or self.seekstate != self.SEEK_STATE_PLAY):
+
+       def _mayShow(self):
+               if self.execing and self.seekstate != self.SEEK_STATE_PLAY:
                        self.pvrStateDialog.show()
 
        def __playStateChanged(self, state):
                playstateString = state[3]
                self.pvrStateDialog["state"].setText(playstateString)
-               self.__mayShow()
+               self._mayShow()
 
 class InfoBarTimeshiftState(InfoBarPVRState):
        def __init__(self):
-               InfoBarPVRState.__init__(self, screen=TimeshiftState, show_always=True)
+               InfoBarPVRState.__init__(self, screen=TimeshiftState)
+
+       def _mayShow(self):
+               if self.execing and self.timeshift_enabled:
+                       self.pvrStateDialog.show()
 
 class InfoBarShowMovies: