do not restart previous tv service when leave standby
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 5 Jan 2007 16:11:06 +0000 (16:11 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 5 Jan 2007 16:11:06 +0000 (16:11 +0000)
lib/python/Screens/Standby.py

index ebac55a..06c4470 100644 (file)
@@ -11,10 +11,9 @@ class Standby(Screen):
                print "leave standby"
                #set input to encoder
                self.avswitch.setInput("ENCODER")
-               #start last played service
-               #self.infobar.servicelist.zap()
-               self.session.nav.playService(eServiceReference(config.tv.lastservice.value))
-               
+               #restart last played service
+               if self.prev_running_service:
+                       self.session.nav.playService(self.prev_running_service)
                #unmute adc
                self.leaveMute()
                #set brightness of lcd
@@ -48,6 +47,8 @@ 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()
                #set input to vcr scart