aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/PictureInPicture.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-11-30 20:03:35 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-11-30 20:03:35 +0000
commit2b557e7ef4b0518736c5162a501cd9bc743930b3 (patch)
treee9995bb4a94f52f063e0a6dc03c7f59059972245 /lib/python/Screens/PictureInPicture.py
parentbc2f8b7dcdacde72c1f06dcb5bd9672094b17ed5 (diff)
downloadenigma2-2b557e7ef4b0518736c5162a501cd9bc743930b3.tar.gz
enigma2-2b557e7ef4b0518736c5162a501cd9bc743930b3.zip
more changes for service groups (replacement for zapping alternatives
plugin).. now its basicaly working.. TODO: change zapping alternatives editor for new style
Diffstat (limited to 'lib/python/Screens/PictureInPicture.py')
-rw-r--r--lib/python/Screens/PictureInPicture.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/python/Screens/PictureInPicture.py b/lib/python/Screens/PictureInPicture.py
index 5c496833..bd340d88 100644
--- a/lib/python/Screens/PictureInPicture.py
+++ b/lib/python/Screens/PictureInPicture.py
@@ -1,5 +1,5 @@
from Screens.Screen import Screen
-from enigma import ePoint, eSize, eServiceCenter
+from enigma import ePoint, eSize, eServiceCenter, getBestPlayableServiceReference, eServiceReference
from Components.VideoWindow import VideoWindow
from Components.config import config, ConfigPosition
@@ -46,14 +46,19 @@ class PictureInPicture(Screen):
return (self.instance.size().width(), self.instance.size().height())
def playService(self, service):
- self.pipservice = eServiceCenter.getInstance().play(service)
- if self.pipservice and not self.pipservice.setTarget(1):
- self.pipservice.start()
- self.currentService = service
- return True
+ if service and (service.flags & eServiceReference.isGroup):
+ ref = getBestPlayableServiceReference(service, eServiceReference())
else:
- self.pipservice = None
- return False
+ ref = service
+ if ref:
+ self.pipservice = eServiceCenter.getInstance().play(ref)
+ if self.pipservice and not self.pipservice.setTarget(1):
+ self.pipservice.start()
+ self.currentService = service
+ return True
+ else:
+ self.pipservice = None
+ return False
def getCurrentService(self):
return self.currentService