sync
[enigma2.git] / Navigation.py
index 57c1283..9c20703 100644 (file)
@@ -11,15 +11,11 @@ class Navigation:
                        raise NavigationInstance.instance
                
                NavigationInstance.instance = self
-               self.ServiceHandler = eServiceCenterPtr()
-               eServiceCenter.getInstance(self.ServiceHandler)
+               self.ServiceHandler = eServiceCenter.getInstance()
 
                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 = [ ]
@@ -45,23 +41,28 @@ class Navigation:
                print "recording service: %s" % (str(ref))
                if isinstance(ref, ServiceReference.ServiceReference):
                        ref = ref.ref
-               service = iRecordableServicePtr()
-               if self.pnav.recordService(ref, service):
+               service = self.pnav.recordService(ref)
+               
+               if service is None:
                        print "record returned non-zero"
                        return None
                else:
-                       print "ok, recordService didn't fail"
                        return service
        
        def enqueueService(self, ref):
                return self.pnav.enqueueService(ref)
        
        def getCurrentService(self):
-               service = iPlayableServicePtr()
-               if self.pnav.getCurrentService(service):
+               service = self.pnav.getCurrentService()
+               
+               if service is None:
                        return None
+               
                return service
        
+       def stopService(self):
+               self.pnav.stopService()
+       
        def getPlaylist(self):
                playlist = ePlaylistPtr()
                if self.pnav.getPlaylist(playlist):
@@ -71,10 +72,10 @@ class Navigation:
        def pause(self, p):
                return self.pnav.pause(p)
        
-       def recordWithTimer(self, begin, end, ref, epg):
+       def recordWithTimer(self, begin, end, ref, epg, description):
                if isinstance(ref, eServiceReference):
                        ref = ServiceReference.ServiceReference(ref)
-               entry = RecordTimer.RecordTimerEntry(begin, end, ref, epg)
+               entry = RecordTimer.RecordTimerEntry(begin, end, ref, epg, description)
                self.RecordTimer.record(entry)
                return entry