from Screen import Screen
import ChannelSelection
from ServiceReference import ServiceReference
-from Components.config import ConfigSelection, ConfigText, ConfigSubList, ConfigSubsection, ConfigDateTime, ConfigClock, ConfigYesNo, getConfigListEntry
-from Components.ActionMap import ActionMap, NumberActionMap
-from Components.ConfigList import ConfigList, ConfigListScreen
+from Components.config import ConfigSelection, ConfigText, ConfigSubList, ConfigDateTime, ConfigClock, ConfigYesNo, getConfigListEntry
+from Components.ActionMap import NumberActionMap
+from Components.ConfigList import ConfigListScreen
from Components.MenuList import MenuList
from Components.Button import Button
-from Components.NimManager import nimmanager
from Components.Label import Label
from Components.Pixmap import Pixmap
-from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from RecordTimer import AFTEREVENT
from enigma import eEPGCache
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
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)
tlist.append((i.getName(), i))
self.session.openWithCallback(self.subserviceSelected, ChoiceBox, title=_("Please select a subservice to record..."), list = tlist, selection = selection)
return
+
+ self.saveTimer()
self.close((True, self.timer))
def subserviceSelected(self, service):
if not service is None:
self.timer.service_ref = ServiceReference(service[1])
+ self.saveTimer()
self.close((True, self.timer))
+ def saveTimer(self):
+ self.session.nav.RecordTimer.saveTimer()
+
def keyCancel(self):
self.close((False,))