#from time import datetime
from Tools import Directories, Notifications
+from Components.config import config
import timer
import xml.dom.minidom
self.record_service = NavigationInstance.instance.recordService(self.service_ref)
if self.record_service == None:
return False
- else:
+ else:
if self.record_service.prepare(self.Filename + ".ts"):
self.record_service = None
return False
self.prepareOK = True
else:
# error.
- Notifications.AddNotificationWithCallback(self.failureCB, MessageBox, _("A timer failed to record!\nDisable TV and try again?\n"))
+ if config.recording.asktozap.value == 0:
+ Notifications.AddNotificationWithCallback(self.failureCB, MessageBox, _("A timer failed to record!\nDisable TV and try again?\n"))
+ else: # zap without asking
+ self.failureCB(True)
elif event == self.EventStart:
if self.prepareOK:
self.record_service.start()
if self.prepareOK:
self.record_service.stop()
self.record_service = None
+
print "Timer successfully ended"
else:
print "prepare failed, thus nothing was recorded."
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"
self.activate(self.EventStart)