2 from enigma import eTimer
5 from Components.config import config
8 from Tools.FuzzyDate import FuzzyTime
9 from Tools.Notifications import AddPopup
10 from Screens.MessageBox import MessageBox
11 NOTIFICATIONID = 'AutoTimerConflictEncounteredNotification'
14 """Automatically Poll AutoTimer"""
20 def start(self, initial = True):
24 delay = config.plugins.autotimer.interval.value*3600
26 if self.query not in self.timer.callback:
27 self.timer.callback.append(self.query)
28 self.timer.startLongTimer(delay)
31 if self.query in self.timer.callback:
32 self.timer.callback.remove(self.query)
36 from plugin import autotimer
38 # Ignore any program errors
40 ret = autotimer.parseEPG()
42 # Dump error to stdout
44 traceback.print_exc(file=sys.stdout)
47 if conflicts and config.plugins.autotimer.notifconflict.value:
49 _("%d conflict(s) encountered when trying to add new timers:\n%s") % (len(conflicts), '\n'.join([_("%s: %s at %s") % (x[4], x[0], FuzzyTime(x[2])) for x in conflicts])),
55 self.timer.startLongTimer(config.plugins.autotimer.interval.value*3600)