(final?) fix in getCurrentIP
[enigma2.git] / Navigation.py
index 6934f11..09daff3 100644 (file)
@@ -20,6 +20,7 @@ class Navigation:
                self.pnav.m_event.get().append(self.callEvent)
                self.event = [ ]
                self.currentlyPlayingService = None
                self.pnav.m_event.get().append(self.callEvent)
                self.event = [ ]
                self.currentlyPlayingService = None
+               self.currentlyPlayingServiceReference = None
                
                self.RecordTimer = RecordTimer.RecordTimer()
 
                
                self.RecordTimer = RecordTimer.RecordTimer()
 
@@ -29,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
@@ -60,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):
@@ -78,3 +86,6 @@ class Navigation:
        
        def shutdown(self):
                self.RecordTimer.shutdown()
        
        def shutdown(self):
                self.RecordTimer.shutdown()
+
+       def stopUserServices(self):
+               self.stopService()