add handling for alternative services
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 18 Jan 2007 12:29:04 +0000 (12:29 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 18 Jan 2007 12:29:04 +0000 (12:29 +0000)
lib/python/Components/Sources/StreamService.py

index ac8db34..4f4e78e 100644 (file)
@@ -1,6 +1,6 @@
 from Source import Source
 from Components.Element import cached
 from Source import Source
 from Components.Element import cached
-from enigma import eServiceReference
+from enigma import eServiceReference, getBestPlayableServiceReference
 
 class StreamService(Source):
        def __init__(self, navcore):
 
 class StreamService(Source):
        def __init__(self, navcore):
@@ -30,6 +30,10 @@ class StreamService(Source):
 
        def execBegin(self):
                print "StreamService execBegin", self.ref.toString()
 
        def execBegin(self):
                print "StreamService execBegin", self.ref.toString()
+               if self.ref.flags & eServiceReference.isGroup:
+                       playref = getBestPlayableServiceReference(self.ref, eServiceReference())
+                       if playref:
+                               self.ref = playref
                self.__service = self.navcore.recordService(self.ref)
                self.navcore.record_event.append(self.recordEvent)
                if self.__service is not None:
                self.__service = self.navcore.recordService(self.ref)
                self.navcore.record_event.append(self.recordEvent)
                if self.__service is not None: