from Components.ConfigList import ConfigList
from Components.NimManager import nimmanager
from Components.Label import Label
+from Components.Pixmap import Pixmap
+from Screens.SubserviceSelection import SubserviceSelection
+from enigma import eEPGCache
import time
import datetime
else: # once
type = 0
repeated = 0
+ weekday = (int(strftime("%w", time.localtime(self.timer.begin))) - 1) % 7
+ day[weekday] = 0
config.timerentry.type = configElement_nonSave("config.timerentry.type", configSelection, type, (_("once"), _("repeated")))
config.timerentry.name = configElement_nonSave("config.timerentry.name", configText, self.timer.name, (configText.extendableSize, self.keyRightCallback))
self.list.append(self.timerTypeEntry)
if (config.timerentry.type.value == 0): # once
- pass
+ self.frequencyEntry = None
else: # repeated
self.frequencyEntry = getConfigListEntry(_("Frequency"), config.timerentry.repeated)
self.list.append(self.frequencyEntry)
def keySelect(self):
if self["config"].getCurrent() == self.channelEntry:
self.session.openWithCallback(self.finishedChannelSelection, ChannelSelection.SimpleChannelSelection, _("Select channel to record from"))
+ else:
+ self.keyGo()
def finishedChannelSelection(self, args):
oldref = self.timer.service_ref
if (config.timerentry.day[x].value == 0): self.timer.setRepeated(x)
self.timer.begin = self.getTimestamp(time.time(), config.timerentry.starttime.value)
- self.timer.end = self.getTimestamp(time.time(), config.timerentry.endtime.value)
+ self.timer.end = self.getTimestamp(time.time(), config.timerentry.endtime.value)
+
+ if self.timer.eit is not None:
+ event = eEPGCache.getInstance().lookupEventId(self.timer.service_ref.ref, self.timer.eit)
+ if event is not None:
+ if event.getNumOfLinkageServices() > 0:
+ self.session.openWithCallback(self.subserviceSelected, SubserviceSelection, event, self.timer.service_ref.ref)
+ return
+ self.close((True, self.timer))
+ def subserviceSelected(self, service):
+ if not service is None:
+ self.timer.service_ref = ServiceReference(service)
self.close((True, self.timer))
def keyCancel(self):