move the movie selector to the currently playing movie
[enigma2.git] / Navigation.py
index c453c6c71ca0dcba1141070e180fe470c9c4a4b4..d8a98b12e59aad865c1b8ab0efa2ee4549c944fc 100644 (file)
@@ -21,6 +21,7 @@ class Navigation:
                self.event = [ ]
                self.currentlyPlayingService = None
                self.currentlyPlayingServiceReference = None
+               self.lastServiceRef = None
                
                self.RecordTimer = RecordTimer.RecordTimer()
 
@@ -29,6 +30,7 @@ class Navigation:
                        x(i)
        
        def playService(self, ref):
+               self.lastServiceRef = self.currentlyPlayingServiceReference
                self.currentlyPlayingServiceReference = None
                if ref is None:
                        self.stopService()
@@ -39,6 +41,9 @@ class Navigation:
                        return 0
                return 1
        
+       def zapLast(self):
+               return self.playService(self.lastServiceRef)
+       
        def getCurrentlyPlayingServiceReference(self):
                return self.currentlyPlayingServiceReference
        
@@ -77,12 +82,15 @@ class Navigation:
        def pause(self, p):
                return self.pnav.pause(p)
        
-       def recordWithTimer(self, begin, end, ref, epg, description):
+       def recordWithTimer(self, ref, begin, end, name, description, eit):
                if isinstance(ref, eServiceReference):
                        ref = ServiceReference.ServiceReference(ref)
-               entry = RecordTimer.RecordTimerEntry(begin, end, ref, epg, description)
+               entry = RecordTimer.RecordTimerEntry(ref, begin, end, name, description, eit)
                self.RecordTimer.record(entry)
                return entry
        
        def shutdown(self):
                self.RecordTimer.shutdown()
+
+       def stopUserServices(self):
+               self.stopService()