def keySelect(self): cur = self["config"].getCurrent() if cur == self.channelEntry: self.session.openWithCallback( self.finishedChannelSelection, ChannelSelection.SimpleChannelSelection, _("Select channel to record from"), currentBouquet=True ) elif config.usage.setup_level.index >= 2 and cur == self.dirname: self.session.openWithCallback( self.pathSelected, MovieLocationBox, _("Select target folder"), self.timerentry_dirname.value, minFree = 100 # We require at least 100MB free space ) elif getPreferredTagEditor() and cur == self.tagsSet: self.session.openWithCallback( self.tagEditFinished, getPreferredTagEditor(), self.timerentry_tags ) else: self.keyGo()
def keySelect(self): cur = self["config"].getCurrent() if cur == self.channelEntry: self.session.openWithCallback( self.finishedChannelSelection, ChannelSelection.SimpleChannelSelection, _("Select channel to record from"), currentBouquet=True ) elif config.usage.setup_level.index >= 2 and cur == self.dirname: menu = [(_("Open select location"), "empty")] if self.timerentry_type.value == "repeated" and self.timerentry_name.value: menu.append((_("Open select location as timer name"), "timername")) if len(menu) == 1: self.openMovieLocationBox() elif len(menu) == 2: text = _("Select action") def selectAction(choice): if choice: if choice[1] == "timername": self.openMovieLocationBox(self.timerentry_name.value) elif choice[1] == "empty": self.openMovieLocationBox() self.session.openWithCallback(selectAction, ChoiceBox, title=text, list=menu) elif getPreferredTagEditor() and cur == self.tagsSet: self.session.openWithCallback( self.tagEditFinished, getPreferredTagEditor(), self.timerentry_tags ) else: self.keyGo()
def keySelect(self): cur = self["config"].getCurrent() if cur == self.channelEntry: self.session.openWithCallback( self.finishedChannelSelection, ChannelSelection.SimpleChannelSelection, _("Select channel to record from"), currentBouquet=True ) elif cur == self.dirname: menu = [(_("Open select location"), "empty")] if self.timerentry_type.value == "repeated" and self.timerentry_name.value: menu.append((_("Open select location as timer name"), "timername")) if len(menu) == 1: self.openMovieLocationBox() elif len(menu) == 2: text = _("Select action") def selectAction(choice): if choice: if choice[1] == "timername": self.openMovieLocationBox(self.timerentry_name.value) elif choice[1] == "empty": self.openMovieLocationBox() self.session.openWithCallback(selectAction, ChoiceBox, title=text, list=menu) elif getPreferredTagEditor() and cur == self.tagsSet: self.session.openWithCallback( self.tagEditFinished, getPreferredTagEditor(), self.timerentry_tags ) else: self.keyGo()
def keySelect(self): cur = self["config"].getCurrent() if cur == self.channelEntry: self.session.openWithCallback( self.finishedChannelSelection, Screens.ChannelSelection.SimpleChannelSelection, _("Select channel to record from")) elif config.usage.setup_level.index >= 2 and cur == self.dirname: self.session.openWithCallback( self.pathSelected, MovieLocationBox, _("Choose target folder"), self.timerentry_dirname.value, minFree=100 # We require at least 100MB free space ) elif getPreferredTagEditor() and cur == self.tagsSet: self.session.openWithCallback(self.tagEditFinished, getPreferredTagEditor(), self.timerentry_tags) elif config.usage.setup_level.index >= 2 and cur in self.timerentry_plugins: self.getConfigListValues() setupFnc = self.timerentry_plugins[cur][1] configentry = cur[1] private_data = self.timerentry_plugins[cur][2] print("calling setupFnc of WHERE_TIMEREDIT plugin:", cur[0], setupFnc, configentry, private_data, self.timer.name) self.session.openWithCallback( boundFunction(self.pluginFinished, cur), setupFnc, configentry, private_data, self.timer) else: self.keyGo()
def keySelect(self): cur = self["config"].getCurrent() if cur == self.channelEntry: self.session.openWithCallback( self.finishedChannelSelection, ChannelSelection.SimpleChannelSelection, _("Select channel to record from") ) elif config.usage.setup_level.index >= 2 and cur == self.dirname: self.session.openWithCallback( self.pathSelected, MovieLocationBox, _("Choose target folder"), self.timerentry_dirname.value, minFree = 100 # We require at least 100MB free space ) elif getPreferredTagEditor() and cur == self.tagsSet: self.session.openWithCallback( self.tagEditFinished, getPreferredTagEditor(), self.timerentry_tags ) elif config.usage.setup_level.index >= 2 and cur in self.timerentry_plugins.keys(): self.getConfigListValues() setupFnc = self.timerentry_plugins[cur][1] configentry = cur[1] private_data = self.timerentry_plugins[cur][2] print "calling setupFnc of WHERE_TIMEREDIT plugin:", cur[0], setupFnc, configentry, private_data, self.timer.name self.session.openWithCallback(boundFunction(self.pluginFinished, cur), setupFnc , configentry, private_data, self.timer) else: self.keyGo()
def createSetup(self, widget): self.list = [] self.entryName = getConfigListEntry(_('Name'), self.timerentry_name, _('Set the name the recording will get.')) self.list.append(self.entryName) self.entryDescription = getConfigListEntry(_('Description'), self.timerentry_description, _('Set the description of the recording.')) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry(_('Timer type'), self.timerentry_justplay, _('Chose between record and ZAP.')) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_('Repeat type'), self.timerentry_type, _('A repeating timer or just once?')) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == 'once': self.frequencyEntry = None else: self.frequencyEntry = getConfigListEntry(_('Repeats'), self.timerentry_repeated, _('Choose between Daily, Weekly, Weekdays or user defined.')) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry(_('Starting on'), self.timerentry_repeatedbegindate, _('Set the date the timer must start.')) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == 'daily': pass if self.timerentry_repeated.value == 'weekdays': pass if self.timerentry_repeated.value == 'weekly': self.list.append(getConfigListEntry(_('Weekday'), self.timerentry_weekday)) if self.timerentry_repeated.value == 'user': self.list.append(getConfigListEntry(_('Monday'), self.timerentry_day[0])) self.list.append(getConfigListEntry(_('Tuesday'), self.timerentry_day[1])) self.list.append(getConfigListEntry(_('Wednesday'), self.timerentry_day[2])) self.list.append(getConfigListEntry(_('Thursday'), self.timerentry_day[3])) self.list.append(getConfigListEntry(_('Friday'), self.timerentry_day[4])) self.list.append(getConfigListEntry(_('Saturday'), self.timerentry_day[5])) self.list.append(getConfigListEntry(_('Sunday'), self.timerentry_day[6])) if self.timerentry_justplay.value != 'zap': self.list.append(getConfigListEntry(_('Rename name and description for new events'), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry(_('Date'), self.timerentry_date, _('Set the date the timer must start.')) if self.timerentry_type.value == 'once': self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_('Start time'), self.timerentry_starttime, _('Set the time the timer must start.')) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_('Set end time'), self.timerentry_showendtime, _('Set the time the timer must stop.')) if self.timerentry_justplay.value == 'zap': self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry(_('End time'), self.timerentry_endtime, _('Set the time the timer must stop.')) if self.timerentry_justplay.value != 'zap' or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_('Channel'), self.timerentry_service, _('Set the channel for this timer.')) self.list.append(self.channelEntry) if self.timerentry_showendtime.value and self.timerentry_justplay.value == 'zap': self.list.append(getConfigListEntry(_('After event'), self.timerentry_afterevent, _("What action is required on complettion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do ecaxtly that."))) self.dirname = getConfigListEntry(_('Location'), self.timerentry_dirname, _('Where should the recording be saved?')) self.tagsSet = getConfigListEntry(_('Tags'), self.timerentry_tagsset, _('Choose a tag for easy finding a recording.')) if self.timerentry_justplay.value != 'zap': if config.usage.setup_level.index >= 2: self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append(getConfigListEntry(_('After event'), self.timerentry_afterevent, _("What action is required on complettion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do ecaxtly that."))) self.list.append(getConfigListEntry(_('Recording type'), self.timerentry_recordingtype, _("Descramble & record ECM' gives the option to descramble afterwards if descrambling on recording failed. 'Don't descramble, record ECM' save a scramble recording that can be descrambled on playback. 'Normal' means descramble the recording and don't record ECM."))) self[widget].list = self.list self[widget].l.setList(self.list) return
def createSetup(self, widget): self.list = [] self.list.append(getConfigListEntry(_("Name"), self.timerentry_name)) self.list.append(getConfigListEntry(_("Description"), self.timerentry_description)) self.timerJustplayEntry = getConfigListEntry(_("Timer Type"), self.timerentry_justplay) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat Type"), self.timerentry_type) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry(_("Starting on"), self.timerentry_repeatedbegindate) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append(getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append(getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append(getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append(getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append(getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append(getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append(getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append(getConfigListEntry(_("Sunday"), self.timerentry_day[6])) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("StartTime"), self.timerentry_starttime) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set End Time"), self.timerentry_showendtime) if self.timerentry_justplay.value == "zap": self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry(_("EndTime"), self.timerentry_endtime) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service) self.list.append(self.channelEntry) self.dirname = getConfigListEntry(_("Location"), self.timerentry_dirname) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset) if self.timerentry_justplay.value != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append(getConfigListEntry(_("After event"), self.timerentry_afterevent)) self[widget].list = self.list self[widget].l.setList(self.list)
def chooseTags(self): preferredTagEditor = getPreferredTagEditor() if preferredTagEditor: self.session.openWithCallback( self.tagEditFinished, preferredTagEditor, self.timerentry_tags )
def keySelect(self): cur = self["config"].getCurrent() if cur and cur[1] == self.timerentry_service: self.session.openWithCallback( self.finishedChannelSelection, Screens.ChannelSelection.SimpleChannelSelection, _("Select channel to record from"), currentBouquet=True) elif cur and cur[1] == self.timerentry_dirname: self.session.openWithCallback( self.pathSelected, MovieLocationBox, _("Select target folder"), self.timerentry_dirname.value, minFree=100 # We require at least 100MB free space ) elif cur and cur[1] == self.timerentry_tagsset: self.session.openWithCallback(self.tagEditFinished, getPreferredTagEditor(), self.timerentry_tags) elif cur and isinstance(cur[1], ConfigText): self.renameEntry() else: TimerEntryBase.keySelect(self)
def createSetup(self, widget): self.list = [] self.entryName = getConfigListEntry( _("Name"), self.timerentry_name, _("Set the name the recording will get.")) self.list.append(self.entryName) self.entryDescription = getConfigListEntry( _("Description"), self.timerentry_description, _("Set the description of the recording.")) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry( _("Timer type"), self.timerentry_justplay, _("Chose between record and ZAP.")) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry( _("Repeat type"), self.timerentry_type, _("A repeating timer or just once?")) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry( _("Repeats"), self.timerentry_repeated, _("Choose between Daily, Weekly, Weekdays or user defined.")) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry( _("Starting on"), self.timerentry_repeatedbegindate, _("Set the date the timer must start.")) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append( getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append( getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append( getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append( getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append( getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append( getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append( getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append( getConfigListEntry(_("Sunday"), self.timerentry_day[6])) if self.timerentry_justplay.value != "zap": self.list.append( getConfigListEntry( _("Rename name and description for new events"), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry( _("Date"), self.timerentry_date, _("Set the date the timer must start.")) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry( _("Start time"), self.timerentry_starttime, _("Set the time the timer must start.")) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry( _("Set end time"), self.timerentry_showendtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.value == "zap": if SystemInfo["PIPAvailable"]: self.list.append( getConfigListEntry(_("Use as PiP if possible"), self.timerentry_pipzap)) # self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry( _("End time"), self.timerentry_endtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.conflictDetectionEntry = getConfigListEntry( _("Enable timer conflict detection"), self.timerentry_conflictdetection) self.list.append(self.conflictDetectionEntry) self.channelEntry = getConfigListEntry( _("Channel"), self.timerentry_service, _("Set the channel for this timer.")) self.list.append(self.channelEntry) self.dirname = getConfigListEntry( _("Location"), self.timerentry_dirname, _("Where should the recording be saved?")) self.tagsSet = getConfigListEntry( _("Tags"), self.timerentry_tagsset, _("Choose a tag for easy finding a recording.")) if self.timerentry_justplay.value != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append( getConfigListEntry( _("After event"), self.timerentry_afterevent, _("What action is required on completion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do exactly that." ))) self.list.append( getConfigListEntry( _("Recording type"), self.timerentry_recordingtype, _("Descramble & record ECM' gives the option to descramble afterwards if descrambling on recording failed. 'Don't descramble, record ECM' save a scramble recording that can be descrambled on playback. 'Normal' means descramble the recording and don't record ECM." ))) self[widget].list = self.list self[widget].l.setList(self.list)
def getPreferredTagEditor(self): return getPreferredTagEditor()
def createSetup(self, widget): self.list = [] self.list.append(getConfigListEntry(_("Name"), self.timerentry_name)) self.list.append( getConfigListEntry(_("Description"), self.timerentry_description)) self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry( _("Starting on"), self.timerentry_repeatedbegindate) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append( getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append( getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append( getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append( getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append( getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append( getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append( getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append( getConfigListEntry(_("Sunday"), self.timerentry_day[6])) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime) self.entryZapWakeup = getConfigListEntry( _("Wakeup receiver for start timer"), self.timerentry_zapwakeup) if self.timerentry_justplay.value == "zap": self.list.append(self.entryZapWakeup) self.list.append(self.entryShowEndTime) self["key_blue"].setText(_("Wakeup type")) else: self["key_blue"].setText("") self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service) self.list.append(self.channelEntry) self.dirname = getConfigListEntry(_("Location"), self.timerentry_dirname) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset) if self.timerentry_justplay.value != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append( getConfigListEntry(_("After event"), self.timerentry_afterevent)) self.list.append( getConfigListEntry(_("Recording type"), self.timerentry_recordingtype)) self[widget].list = self.list self[widget].l.setList(self.list)
def createSetup(self, widget): self.list = [] self.list.append(getConfigListEntry(_("Name"), self.timerentry_name, _("Set the name the recording will get."))) self.list.append(getConfigListEntry(_("Description"), self.timerentry_description, _("Set the description of the recording."))) self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay, _("Chose between record and ZAP.")) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type, _("A repeating timer or just once?")) self.list.append(self.timerTypeEntry) if self.timerentry_type.getValue() == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated, _("Choose between Daily, Weekly, Weekdays or user defined.")) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry(_("Starting on"), self.timerentry_repeatedbegindate, _("Set the date the timer must start.")) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.getValue() == "daily": pass if self.timerentry_repeated.getValue() == "weekdays": pass if self.timerentry_repeated.getValue() == "weekly": self.list.append(getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.getValue() == "user": self.list.append(getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append(getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append(getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append(getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append(getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append(getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append(getConfigListEntry(_("Sunday"), self.timerentry_day[6])) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date, _("Set the date the timer must start.")) if self.timerentry_type.getValue() == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime, _("Set the time the timer must start.")) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.getValue() == "zap": self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.getValue() != "zap" or self.timerentry_showendtime.getValue(): self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service, _("Set the channel for this timer.")) self.list.append(self.channelEntry) self.dirname = getConfigListEntry(_("Location"), self.timerentry_dirname, _("Where should the recording be saved?")) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset, _("Choose a tag for easy finding a recording.")) if self.timerentry_justplay.getValue() != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append(getConfigListEntry(_("After event"), self.timerentry_afterevent, _("What action is required on complettion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do ecaxtly that."))) self.list.append(getConfigListEntry(_("Recording type"), self.timerentry_recordingtype, _("Descramble & record ECM' gives the option to descramble afterwards if descrambling on recording failed. 'Don't descramble, record ECM' save a scramble recording that can be descrambled on playback. 'Normal' means descramble the recording and don't record ECM."))) self[widget].list = self.list self[widget].l.setList(self.list)
def createSetup(self, widget): self.list = [] self.entryFallbackTimer = getConfigListEntry(_("Fallback Timer"), self.timerentry_fallback) if config.usage.remote_fallback_external_timer.value and config.usage.remote_fallback.value and not hasattr( self, "timerentry_remote"): self.list.append(self.entryFallbackTimer) self.entryName = getConfigListEntry(_("Name"), self.timerentry_name) self.list.append(self.entryName) self.entryDescription = getConfigListEntry(_("Description"), self.timerentry_description) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay) if config.usage.setup_level.index >= 1: self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry( _("Starting on"), self.timerentry_repeatedbegindate) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append( getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append( getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append( getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append( getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append( getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append( getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append( getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append( getConfigListEntry(_("Sunday"), self.timerentry_day[6])) if self.timerentry_justplay.value != "zap": self.list.append( getConfigListEntry( _("Rename name and description for new events"), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime) self.entryZapWakeup = getConfigListEntry( _("Wakeup receiver for start timer"), self.timerentry_zapwakeup) if self.timerentry_justplay.value == "zap": self.list.append(self.entryZapWakeup) if SystemInfo["PIPAvailable"]: self.list.append( getConfigListEntry(_("Use as PiP if possible"), self.timerentry_pipzap)) self.list.append(self.entryShowEndTime) self["key_blue"].setText(_("Wakeup type")) else: self["key_blue"].setText("") self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service) self.list.append(self.channelEntry) self.dirname = getConfigListEntry( _("Location"), self.timerentry_fallbackdirname ) if self.timerentry_fallback.value and self.timerentry_fallbackdirname.value else getConfigListEntry( _("Location"), self.timerentry_dirname) if config.usage.setup_level.index >= 2 and ( self.timerentry_fallback.value and self.timerentry_fallbackdirname.value or self.timerentry_dirname.value): # expert+ self.list.append(self.dirname) self.conflictDetectionEntry = getConfigListEntry( _("Enable timer conflict detection"), self.timerentry_conflictdetection) if not self.timerentry_fallback.value: self.list.append(self.conflictDetectionEntry) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset) if self.timerentry_justplay.value != "zap" and not self.timerentry_fallback.value: if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append( getConfigListEntry(_("After event"), self.timerentry_afterevent)) self.list.append( getConfigListEntry(_("Recording type"), self.timerentry_recordingtype)) self[widget].list = self.list self[widget].l.setList(self.list)
def createSetup(self, widget): self.list = [] self.entryFallbackTimer = getConfigListEntry(_("Fallback Timer"), self.timerentry_fallback) if config.usage.remote_fallback_external_timer.value and config.usage.remote_fallback.value and not hasattr(self, "timerentry_remote"): self.list.append(self.entryFallbackTimer) self.entryName = getConfigListEntry(_("Name"), self.timerentry_name) self.list.append(self.entryName) self.entryDescription = getConfigListEntry(_("Description"), self.timerentry_description) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry(_("Starting on"), self.timerentry_repeatedbegindate) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append(getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append(getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append(getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append(getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append(getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append(getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append(getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append(getConfigListEntry(_("Sunday"), self.timerentry_day[6])) if self.timerentry_justplay.value != "zap": self.list.append(getConfigListEntry(_("Rename name and description for new events"), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime) self.entryZapWakeup = getConfigListEntry(_("Wakeup receiver for start timer"), self.timerentry_zapwakeup) if self.timerentry_justplay.value == "zap": self.list.append(self.entryZapWakeup) if SystemInfo["PIPAvailable"]: self.list.append(getConfigListEntry(_("Use as PiP if possible"), self.timerentry_pipzap)) self.list.append(self.entryShowEndTime) self["key_blue"].setText(_("Wakeup type")) else: self["key_blue"].setText("") self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service) self.list.append(self.channelEntry) self.conflictDetectionEntry = getConfigListEntry(_("Enable timer conflict detection"), self.timerentry_conflictdetection) if not self.timerentry_fallback.value: self.list.append(self.conflictDetectionEntry) self.dirname = getConfigListEntry(_("Location"), self.timerentry_dirname) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset) if self.timerentry_justplay.value != "zap" and not self.timerentry_fallback.value: if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append(getConfigListEntry(_("After event"), self.timerentry_afterevent)) self.list.append(getConfigListEntry(_("Recording type"), self.timerentry_recordingtype)) self[widget].list = self.list self[widget].l.setList(self.list)
def createSetup(self, widget): self.list = [] self.entryName = getConfigListEntry(_("Name"), self.timerentry_name, _("The name the recording will get.")) self.list.append(self.entryName) self.entryDescription = getConfigListEntry(_("Description"), self.timerentry_description, _("The description of the recording.")) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay, _("Choose between record and ZAP.")) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry(_("Repeat type"), self.timerentry_type, _("A repeating timer or just once?")) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry(_("Repeats"), self.timerentry_repeated, _("The type of repetition required: daily, weekly on a specified day, on weekdays (Mon-Fri), or regularly on specified days.")) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry(_("Starting on"), self.timerentry_repeatedbegindate, _("The timer becomes active (but doesn't necessarily run) on this date.")) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append(getConfigListEntry(_("Weekday"), self.timerentry_weekday, _("The day of the week the timer runs."))) if self.timerentry_repeated.value == "user": self.list.append(getConfigListEntry(_("Monday"), self.timerentry_day[0], _("Enable/disable the timer on Mondays."))) self.list.append(getConfigListEntry(_("Tuesday"), self.timerentry_day[1], _("Enable/disable the timer on Tuesdays."))) self.list.append(getConfigListEntry(_("Wednesday"), self.timerentry_day[2], _("Enable/disable the timer on Wednesdays."))) self.list.append(getConfigListEntry(_("Thursday"), self.timerentry_day[3], _("Enable/disable the timer on Thursdays."))) self.list.append(getConfigListEntry(_("Friday"), self.timerentry_day[4], _("Enable/disable the timer on Fridays."))) self.list.append(getConfigListEntry(_("Saturday"), self.timerentry_day[5], _("Enable/disable the timer on Saturdays."))) self.list.append(getConfigListEntry(_("Sunday"), self.timerentry_day[6], _("Enable/disable the timer on Sundays."))) if self.timerentry_justplay.value != "zap": self.list.append(getConfigListEntry(_("Generate name and description for new events"), self.timerentry_renamerepeat, _("Generate a new name and description from the EPG for each run of the timer."))) self.entryDate = getConfigListEntry(_("Date"), self.timerentry_date, _("The date the timer starts.")) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry(_("Start time"), self.timerentry_starttime, _("The time the timer starts.")) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime, _("Set the time the ZAP timer completes and performs any \"After event\" action.")) if self.timerentry_justplay.value == "zap": self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime, _("The time the timer completes and the \"After event\" action is taken. If the end time is earlier than the start time of the timer, the completion action takes place at that time on the following day.")) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry(_("Channel"), self.timerentry_service, _("The channel for this timer.")) self.list.append(self.channelEntry) self.dirname = getConfigListEntry(_("Location"), self.timerentry_dirname, _("Where the recording will be saved.")) self.tagsSet = getConfigListEntry(_("Tags"), self.timerentry_tagsset, _("Choose a tag to make searching for the recording easier.")) if self.timerentry_justplay.value != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append(getConfigListEntry(_("After event"), self.timerentry_afterevent, _("Action taken on the completion of the timer. \"Auto\" lets your %s %s return to the state it was in when the timer started. \"Do nothing\", \"Go to standby\" and \"Go to deep standby\" do exactly that.") % (getMachineBrand(), getMachineName()))) self.list.append(getConfigListEntry(_("Recording type"), self.timerentry_recordingtype, _("\"Descramble & record ECM\" allows the recording to be descrambled later if descrambling while recording failed. \"Don't descramble, record ECM\" saves a scrambled recording that can be descrambled on playback. \"Normal\" means descramble while recording and don't record ECM."))) self[widget].list = self.list self[widget].l.setList(self.list)
def createSetup(self, widget): if not self.timer in self.session.nav.RecordTimer.timer_list: newtime = None if self.timerentry_justplay.value == 'zap' and self.timertyp != 'zap': newtime = self.getTimestamp( self.timerentry_date.value, self.timerentry_starttime.value ) + config.recording.margin_before.value * 60 newbegin = localtime(newtime) elif self.timerentry_justplay.value != 'zap' and self.timertyp == 'zap': newtime = self.getTimestamp( self.timerentry_date.value, self.timerentry_starttime.value ) - config.recording.margin_before.value * 60 newbegin = localtime(newtime) if newtime: self.timerentry_date.value = newtime self.timerentry_starttime.value = [ newbegin.tm_hour, newbegin.tm_min ] self.timertyp = self.timerentry_justplay.value self.list = [] self.timerJustplayEntry = getConfigListEntry( _("Timer type"), self.timerentry_justplay, _("Chose between record and ZAP.")) self.list.append(self.timerJustplayEntry) self.entryName = getConfigListEntry( _("Name"), self.timerentry_name, _("Set the name the recording will get.")) self.list.append(self.entryName) self.entryDescription = getConfigListEntry( _("Description"), self.timerentry_description, _("Set the description of the recording.")) self.list.append(self.entryDescription) self.timerTypeEntry = getConfigListEntry( _("Repeat type"), self.timerentry_type, _("A repeating timer or just once?")) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == "once": self.frequencyEntry = None else: # repeated self.frequencyEntry = getConfigListEntry( _("Repeats"), self.timerentry_repeated, _("Choose between Daily, Weekly, Weekdays or user defined.")) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry( _("Starting on"), self.timerentry_repeatedbegindate, _("Set the date the timer must start.")) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == "daily": pass if self.timerentry_repeated.value == "weekdays": pass if self.timerentry_repeated.value == "weekly": self.list.append( getConfigListEntry(_("Weekday"), self.timerentry_weekday)) if self.timerentry_repeated.value == "user": self.list.append( getConfigListEntry(_("Monday"), self.timerentry_day[0])) self.list.append( getConfigListEntry(_("Tuesday"), self.timerentry_day[1])) self.list.append( getConfigListEntry(_("Wednesday"), self.timerentry_day[2])) self.list.append( getConfigListEntry(_("Thursday"), self.timerentry_day[3])) self.list.append( getConfigListEntry(_("Friday"), self.timerentry_day[4])) self.list.append( getConfigListEntry(_("Saturday"), self.timerentry_day[5])) self.list.append( getConfigListEntry(_("Sunday"), self.timerentry_day[6])) if self.timerentry_justplay.value != "zap": self.list.append( getConfigListEntry( _("Rename name and description for new events"), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry( _("Date"), self.timerentry_date, _("Set the date the timer must start.")) if self.timerentry_type.value == "once": self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry( _("Start time"), self.timerentry_starttime, _("Set the time the timer must start.")) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry( _("Set end time"), self.timerentry_showendtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.value == "zap": self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry( _("End time"), self.timerentry_endtime, _("Set the time the timer must stop.")) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry( _("Channel"), self.timerentry_service, _("Set the channel for this timer.")) self.list.append(self.channelEntry) if self.timerentry_showendtime.value and self.timerentry_justplay.value == "zap": self.list.append( getConfigListEntry( _("After event"), self.timerentry_afterevent, _("What action is required on completion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do exactly that." ))) description = free = "" try: if self.timerentry_justplay.value != "zap": stat = statvfs(self.timerentry_dirname.value) a = float(stat.f_blocks) * stat.f_bsize / 1024 / 1024 / 1024 b = float(stat.f_bavail) * stat.f_bsize / 1024 / 1024 / 1024 c = 100.0 * b / a free = ("%0.f GB (%0.f %s) " + _("free diskspace")) % (b, c, "%") description = _("Current location") except: pass self["locationdescription"].setText(description) self["locationfreespace"].setText(free) self.dirname = getConfigListEntry( _("Location"), self.timerentry_dirname, _("Where should the recording be saved?")) self.tagsSet = getConfigListEntry( _("Tags"), self.timerentry_tagsset, _("Choose a tag for easy finding a recording.")) if self.timerentry_justplay.value != "zap": if config.usage.setup_level.index >= 2: # expert+ self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append( getConfigListEntry( _("After Recording"), self.timerentry_afterevent, _("What action is required on completion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do exactly that." ))) self.list.append( getConfigListEntry( _("Recording type"), self.timerentry_recordingtype, _("Descramble & record ECM' gives the option to descramble afterwards if descrambling on recording failed. 'Don't descramble, record ECM' save a scramble recording that can be descrambled on playback. 'Normal' means descramble the recording and don't record ECM." ))) self[widget].list = self.list self[widget].l.setList(self.list)
def createSetup(self, widget): self.list = [] self.entryName = getConfigListEntry( _('Name'), self.timerentry_name, _('Set the name the recording will get.')) self.list.append(self.entryName) self.entryDescription = getConfigListEntry( _('Description'), self.timerentry_description, _('Set the description of the recording.')) self.list.append(self.entryDescription) self.timerJustplayEntry = getConfigListEntry( _('Timer type'), self.timerentry_justplay, _('Chose between record and ZAP.')) self.list.append(self.timerJustplayEntry) self.timerTypeEntry = getConfigListEntry( _('Repeat type'), self.timerentry_type, _('A repeating timer or just once?')) self.list.append(self.timerTypeEntry) if self.timerentry_type.value == 'once': self.frequencyEntry = None else: self.frequencyEntry = getConfigListEntry( _('Repeats'), self.timerentry_repeated, _('Choose between Daily, Weekly, Weekdays or user defined.')) self.list.append(self.frequencyEntry) self.repeatedbegindateEntry = getConfigListEntry( _('Starting on'), self.timerentry_repeatedbegindate, _('Set the date the timer must start.')) self.list.append(self.repeatedbegindateEntry) if self.timerentry_repeated.value == 'daily': pass if self.timerentry_repeated.value == 'weekdays': pass if self.timerentry_repeated.value == 'weekly': self.list.append( getConfigListEntry(_('Weekday'), self.timerentry_weekday)) if self.timerentry_repeated.value == 'user': self.list.append( getConfigListEntry(_('Monday'), self.timerentry_day[0])) self.list.append( getConfigListEntry(_('Tuesday'), self.timerentry_day[1])) self.list.append( getConfigListEntry(_('Wednesday'), self.timerentry_day[2])) self.list.append( getConfigListEntry(_('Thursday'), self.timerentry_day[3])) self.list.append( getConfigListEntry(_('Friday'), self.timerentry_day[4])) self.list.append( getConfigListEntry(_('Saturday'), self.timerentry_day[5])) self.list.append( getConfigListEntry(_('Sunday'), self.timerentry_day[6])) if self.timerentry_justplay.value != 'zap': self.list.append( getConfigListEntry( _('Rename name and description for new events'), self.timerentry_renamerepeat)) self.entryDate = getConfigListEntry( _('Date'), self.timerentry_date, _('Set the date the timer must start.')) if self.timerentry_type.value == 'once': self.list.append(self.entryDate) self.entryStartTime = getConfigListEntry( _('Start time'), self.timerentry_starttime, _('Set the time the timer must start.')) self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry( _('Set end time'), self.timerentry_showendtime, _('Set the time the timer must stop.')) if self.timerentry_justplay.value == 'zap': self.list.append(self.entryShowEndTime) self.entryEndTime = getConfigListEntry( _('End time'), self.timerentry_endtime, _('Set the time the timer must stop.')) if self.timerentry_justplay.value != 'zap' or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) self.channelEntry = getConfigListEntry( _('Channel'), self.timerentry_service, _('Set the channel for this timer.')) self.list.append(self.channelEntry) if self.timerentry_showendtime.value and self.timerentry_justplay.value == 'zap': self.list.append( getConfigListEntry( _('After event'), self.timerentry_afterevent, _("What action is required on complettion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do ecaxtly that." ))) self.dirname = getConfigListEntry( _('Location'), self.timerentry_dirname, _('Where should the recording be saved?')) self.tagsSet = getConfigListEntry( _('Tags'), self.timerentry_tagsset, _('Choose a tag for easy finding a recording.')) if self.timerentry_justplay.value != 'zap': if config.usage.setup_level.index >= 2: self.list.append(self.dirname) if getPreferredTagEditor(): self.list.append(self.tagsSet) self.list.append( getConfigListEntry( _('After event'), self.timerentry_afterevent, _("What action is required on complettion of the timer? 'Auto' lets the box return to the state it had when the timer started. 'Do nothing', 'Go to standby' and 'Go to deep standby' do ecaxtly that." ))) self.list.append( getConfigListEntry( _('Recording type'), self.timerentry_recordingtype, _("Descramble & record ECM' gives the option to descramble afterwards if descrambling on recording failed. 'Don't descramble, record ECM' save a scramble recording that can be descrambled on playback. 'Normal' means descramble the recording and don't record ECM." ))) self[widget].list = self.list self[widget].l.setList(self.list) return