allow two different behaviours when going into resume: SUSPEND_STOPS (default as...
[enigma2.git] / lib / python / Screens / Standby.py
index d3767f3..4a9dca4 100644 (file)
@@ -45,10 +45,17 @@ class Standby(Screen):
 
                #mute adc
                self.setMute()
-               #get currently playing service reference
-               self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceReference()
-               #stop actual played dvb-service
-               self.session.nav.stopService()
+
+               if self.session.current_dialog.ALLOW_SUSPEND == Screen.SUSPEND_STOPS:
+                       #get currently playing service reference
+                       self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceReference()
+                       #stop actual played dvb-service
+                       self.session.nav.stopService()
+                       self.paused_service = None
+               elif self.session.current_dialog.ALLOW_SUSPEND == Screen.SUSPEND_PAUSES:
+                       self.paused_service = self.session.current_dialog
+                       self.paused_service.pauseService()
+                       self.prev_running_service = None
                #set input to vcr scart
                if SystemInfo["ScartSwitch"]:
                        self.avswitch.setInput("SCART")
@@ -63,6 +70,8 @@ class Standby(Screen):
        def __onClose(self):
                if self.prev_running_service:
                        self.session.nav.playService(self.prev_running_service)
+               elif self.paused_service:
+                       self.paused_service.unPauseService()
 
        def createSummary(self):
                return StandbySummary