X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=timer.py;h=750a8c0300e2537c90628fd4c1e23f07a3deeeff;hp=be629099f62e7f91464f92178e16553dcd7b5003;hb=c2bbed774d6e5c51b4af23a60a95aca74aa5d4e9;hpb=27444040e11c4d3ce52b8dc1a74a076b006a1b04 diff --git a/timer.py b/timer.py index be62909..750a8c0 100644 --- a/timer.py +++ b/timer.py @@ -3,6 +3,8 @@ from time import strftime, time, localtime, mktime from enigma import eTimer import datetime +import NavigationInstance + class TimerEntry: StateWaiting = 0 StatePrepared = 1 @@ -175,6 +177,27 @@ class Timer: insort(self.timer_list, entry) if not noRecalc: self.calcNextActivation() + +# small piece of example code to understand how to use record simulation +# if NavigationInstance.instance: +# lst = [ ] +# cnt = 0 +# for timer in self.timer_list: +# print "timer", cnt +# cnt += 1 +# if timer.state == 0: #waiting +# lst.append(NavigationInstance.instance.recordService(timer.service_ref)) +# else: +# print "STATE: ", timer.state +# +# for rec in lst: +# if rec.start(True): #simulate +# print "FAILED!!!!!!!!!!!!" +# else: +# print "OK!!!!!!!!!!!!!!" +# NavigationInstance.instance.stopRecordService(rec) +# else: +# print "no NAV" def setNextActivation(self, when): delay = int((when - time()) * 1000)