(final?) fix in getCurrentIP
[enigma2.git] / Navigation.py
index b71c93c..09daff3 100644 (file)
@@ -12,18 +12,15 @@ class Navigation:
                
                NavigationInstance.instance = self
                self.ServiceHandler = eServiceCenter.getInstance()
                
                NavigationInstance.instance = self
                self.ServiceHandler = eServiceCenter.getInstance()
-               print self.ServiceHandler
 
                import Navigation as Nav
                Nav.navcore = self
                
 
                import Navigation as Nav
                Nav.navcore = self
                
-               print "Navcore instance set!"
-               print Nav.navcore
-               
                self.pnav = pNavigation()
                self.pnav.m_event.get().append(self.callEvent)
                self.event = [ ]
                self.currentlyPlayingService = None
                self.pnav = pNavigation()
                self.pnav.m_event.get().append(self.callEvent)
                self.event = [ ]
                self.currentlyPlayingService = None
+               self.currentlyPlayingServiceReference = None
                
                self.RecordTimer = RecordTimer.RecordTimer()
 
                
                self.RecordTimer = RecordTimer.RecordTimer()
 
@@ -33,6 +30,10 @@ class Navigation:
        
        def playService(self, ref):
                self.currentlyPlayingServiceReference = None
        
        def playService(self, ref):
                self.currentlyPlayingServiceReference = None
+               if ref is None:
+                       self.stopService()
+                       return 0
+               
                if not self.pnav.playService(ref):
                        self.currentlyPlayingServiceReference = ref
                        return 0
                if not self.pnav.playService(ref):
                        self.currentlyPlayingServiceReference = ref
                        return 0
@@ -51,7 +52,6 @@ class Navigation:
                        print "record returned non-zero"
                        return None
                else:
                        print "record returned non-zero"
                        return None
                else:
-                       print "ok, recordService didn't fail"
                        return service
        
        def enqueueService(self, ref):
                        return service
        
        def enqueueService(self, ref):
@@ -65,6 +65,9 @@ class Navigation:
                
                return service
        
                
                return service
        
+       def stopService(self):
+               self.pnav.stopService()
+       
        def getPlaylist(self):
                playlist = ePlaylistPtr()
                if self.pnav.getPlaylist(playlist):
        def getPlaylist(self):
                playlist = ePlaylistPtr()
                if self.pnav.getPlaylist(playlist):
@@ -83,3 +86,6 @@ class Navigation:
        
        def shutdown(self):
                self.RecordTimer.shutdown()
        
        def shutdown(self):
                self.RecordTimer.shutdown()
+
+       def stopUserServices(self):
+               self.stopService()