use new setTarget
authorFelix Domke <tmbinc@elitedvb.net>
Sat, 8 Apr 2006 15:28:44 +0000 (15:28 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sat, 8 Apr 2006 15:28:44 +0000 (15:28 +0000)
lib/python/Screens/InfoBarGenerics.py

index 0ae0dc4..58c1269 100644 (file)
@@ -981,10 +981,15 @@ class InfoBarExtensions:
                        self.pip = self.session.instantiateDialog(PictureInPicture)
                        #self.pip.show()
                        
                        self.pip = self.session.instantiateDialog(PictureInPicture)
                        #self.pip.show()
                        
-                       newservice = str(ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference())) + "s"
-                       self.pipservice = eServiceCenter.getInstance().play(eServiceReference(newservice))
-                       self.pipservice.start()
-                       self.pipshown = True
+                       newservice = self.session.nav.getCurrentlyPlayingServiceReference()
+                       self.pipservice = eServiceCenter.getInstance().play(newservice)
+                       if self.pipservice and not self.pipservice.setTarget(1):
+                               self.pipservice.start()
+                               self.pipshown = True
+                       else:
+                               self.pipservice = None
+                               del self.pip
+
                elif answer[1] == "pipoff":
                        #self.pip.hide()
                        del self.pip
                elif answer[1] == "pipoff":
                        #self.pip.hide()
                        del self.pip