self.timerentry_justplay = ConfigSelection(choices = [("zap", _("zap")), ("record", _("record"))], default = {0: "record", 1: "zap"}[justplay])
self.timerentry_afterevent = ConfigSelection(choices = [("nothing", _("do nothing")), ("standby", _("go to standby")), ("deepstandby", _("go to deep standby"))], default = afterevent)
self.timerentry_type = ConfigSelection(choices = [("once",_("once")), ("repeated", _("repeated"))], default = type)
- self.timerentry_name = ConfigText(default = self.timer.name, fixed_size = False)
- self.timerentry_description = ConfigText(default = self.timer.description, fixed_size = False)
+ self.timerentry_name = ConfigText(default = self.timer.name, visible_width = 50, fixed_size = False)
+ self.timerentry_description = ConfigText(default = self.timer.description, visible_width = 50, fixed_size = False)
self.timerentry_repeated = ConfigSelection(default = repeated, choices = [("daily", _("daily")), ("weekly", _("weekly")), ("weekdays", _("Mon-Fri")), ("user", _("user defined"))])
servicename = str(self.timer.service_ref.getServiceName())
except:
pass
+ self.timerentry_service_ref = self.timer.service_ref
self.timerentry_service = ConfigSelection([servicename])
self.timerentry_startdate.addNotifier(self.checkDate)
def finishedChannelSelection(self, *args):
if len(args):
- self.timer.service_ref = ServiceReference(args[0])
- self.timerentry_service.setCurrentText(self.timer.service_ref.getServiceName())
+ self.timerentry_service_ref = ServiceReference(args[0])
+ self.timerentry_service.setCurrentText(self.timerentry_service_ref.getServiceName())
self["config"].invalidate(self.channelEntry)
def getTimestamp(self, date, mytime):
dt = datetime.datetime(d.tm_year, d.tm_mon, d.tm_mday, mytime[0], mytime[1])
return int(time.mktime(dt.timetuple()))
+ def buildRepeatedBegin(self, rep_time, start_time):
+ d = time.localtime(rep_time)
+ dt = datetime.datetime(d.tm_year, d.tm_mon, d.tm_mday, start_time[0], start_time[1])
+ return int(time.mktime(dt.timetuple()))
+
def getBeginEnd(self):
enddate = self.timerentry_enddate.value
endtime = self.timerentry_endtime.value
self.timer.justplay = self.timerentry_justplay.value == "zap"
self.timer.resetRepeated()
self.timer.afterEvent = {"nothing": AFTEREVENT.NONE, "deepstandby": AFTEREVENT.DEEPSTANDBY, "standby": AFTEREVENT.STANDBY}[self.timerentry_afterevent.value]
-
+ self.timer.service_ref = self.timerentry_service_ref
+
if self.timerentry_type.value == "once":
self.timer.begin, self.timer.end = self.getBeginEnd()
if self.timerentry_type.value == "repeated":
- self.timer.repeatedbegindate = self.timerentry_repeatedbegindate.value
if self.timerentry_repeated.value == "daily":
for x in range(0,7):
self.timer.setRepeated(x)
if self.timerentry_day[x].value:
self.timer.setRepeated(x)
+ self.timer.repeatedbegindate = self.buildRepeatedBegin(self.timerentry_repeatedbegindate.value, self.timerentry_starttime.value)
self.timer.begin = self.getTimestamp(time.time(), self.timerentry_starttime.value)
self.timer.end = self.getTimestamp(time.time(), self.timerentry_endtime.value)
}, -1)
def deleteEntry(self):
- self.log_entries.remove(self["loglist"].getCurrent()[1])
+ cur = self["loglist"].getCurrent()
+ if cur is None:
+ return
+ self.log_entries.remove(cur[1])
self.fillLogList()
self["loglist"].l.setList(self.list)
self.updateText()