fix python refcounting
[enigma2.git] / RecordTimer.py
index 7088bb479606e39150c54e4d9f5ee553bb234c25..2234bfc3f19f9975d141251c87c19138fbd80fd3 100644 (file)
@@ -8,6 +8,7 @@ import timer
 import xml.dom.minidom
 
 from Screens.MessageBox import MessageBox
+from Screens.SubserviceSelection import SubserviceSelection
 import NavigationInstance
 
 from Tools.XMLTools import elementsWithTag
@@ -26,7 +27,7 @@ def parseEvent(ev):
        description = ev.getShortDescription()
        begin = ev.getBeginTime()
        end = begin + ev.getDuration()
-       eit = None
+       eit = ev.getEventId()
        return (begin, end, name, description, eit)
 
 class RecordTimerEntry(timer.TimerEntry):
@@ -102,6 +103,7 @@ class RecordTimerEntry(timer.TimerEntry):
                        if self.prepareOK:
                                self.record_service.stop()
                                self.record_service = None
+                               
                                print "Timer successfully ended"
                        else:
                                print "prepare failed, thus nothing was recorded."
@@ -112,11 +114,13 @@ class RecordTimerEntry(timer.TimerEntry):
 
        def failureCB(self, answer):
                if answer == True:
-                       NavigationInstance.instance.stopUserServices()
+                       #NavigationInstance.instance.stopUserServices()
+                       print "[RecordTimer] zapping to", self.service_ref
+                       NavigationInstance.instance.playService(self.service_ref.ref)
                        self.activate(self.EventPrepare)
+
                        if self.wantStart:
                                print "post-activating record"
-                               NavigationInstance.instance.playService(self.serviceref)
                                self.activate(self.EventStart)
                else:
                        print "user killed record"