don't crash when no StreamService reference was set
[enigma2.git] / lib / python / Components / Sources / StreamService.py
index 4f4e78e..fbd3d25 100644 (file)
@@ -1,6 +1,6 @@
 from Source import Source
 from Components.Element import cached
-from enigma import eServiceReference, getBestPlayableServiceReference
+from enigma import eServiceReference
 
 class StreamService(Source):
        def __init__(self, navcore):
@@ -29,11 +29,10 @@ class StreamService(Source):
                self.changed((self.CHANGED_ALL, ))
 
        def execBegin(self):
+               if self.ref is None:
+                       print "StreamService has no service ref set."
+                       return
                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: