def keySave(self): sleepTimer = config.usage.sleepTimer.value if sleepTimer == -1: sleepTimer = 0 # Default sleep timer if the event end time can't be determined, default is the sleep timer is disabled. ref = self.session.nav.getCurrentlyPlayingServiceOrGroup() if ref: path = ref.getPath() if path: # Movie service = self.session.nav.getCurrentService() seek = service and service.seek() if seek: length = seek.getLength() position = seek.getPlayPosition() if length and position: sleepTimer = length[1] - position[1] if sleepTimer > 0: sleepTimer = int(sleepTimer // 90000) else: # Service epg = eEPGCache.getInstance() event = epg.lookupEventTime(ref, -1, 0) if event: sleepTimer = event.getBeginTime() + event.getDuration( ) - int(time()) sleepTimer += (config.recording.margin_after.value * 60) InfoBar.instance.setSleepTimer(sleepTimer) InfoBar.instance.setEnergyTimer(config.usage.energyTimer.value) Setup.keySave(self)
def dofinish(self): self.activityTimer.stop() del self.activityTimer if self.mbox: self.mbox.close() self.session.nav.playService(self.oldref, adjust=False) if self.camtype == "None" or "e" in self.camtype: Setup.keySave(self)
def keySave(self): if self.errorItem == -1: Setup.keySave(self) else: self.session.open(MessageBox, "%s\n\n%s" % (self.getFootnote(), _("Please select an acceptable directory.")), type=MessageBox.TYPE_ERROR)
def keySave(self): device = "" if hasattr(self, "cardservers") and (config.misc.cardservers.value != self.cardserver.current()): device = "sc" elif config.misc.softcams.value != self.softcam.current(): device = "s" if device: self.restart(device="e%s" % device) else: Setup.keySave(self)
def keySave(self): purgeOrbposConfig() if not config.plugins.epgsearch.showinplugins.value: for plugin in plugins.getPlugins( PluginDescriptor.WHERE_PLUGINMENU): if plugin.name == _("EPGSearch"): plugins.removePlugin(plugin) plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) Setup.keySave(self)
def keySave(self): camtype = "" print( "[SoftcamSetup][keySave] self.softcam.current=%s config.misc.softcams.value=%s" % (self.softcam.current(), config.misc.softcams.value)) if config.misc.softcams.value != self.softcam.current(): camtype = "s" if camtype: self.restart(camtype="e%s" % camtype) else: Setup.keySave(self)
def doStart(self): self.activityTimer.stop() del self.activityTimer if "s" in self.device: self.softcam.select(config.misc.softcams.value) self.softcam.command("start") if "c" in self.device: self.cardserver.select(config.misc.cardservers.value) self.cardserver.command("start") if self.mbox: self.mbox.close() self.session.nav.playService(self.oldref, adjust=False) if "e" in self.device: Setup.keySave(self)
def keySaveConfirm(self, confirmed): if confirmed: configItem = getattr(config.inputDevices, self.device) configItem.save() print("[InputDeviceSetup] Changes made for '%s' (%s) saved." % (self.device, self.nameEntry[1].value)) return Setup.keySave(self) else: print( "[InputDeviceSetup] Changes made for '%s' (%s) were not confirmed." % (self.device, self.nameEntry[1].value))
def keySave(self): map = config.inputDevices.keyboardMap.value if map != self.initialKeyboardMap: print("[InputDevice] Activating keyboard keymap: '%s'." % map) mapPath = resolveFilename(SCOPE_KEYMAPS, map) if isfile(mapPath): Console().ePopen("/sbin/loadkmap < %s" % mapPath) else: print( "[InputDevice] Error: Selected keyboard keymap file '%s' doesn't exist!" % mapPath) index = config.inputDevices.remotesIndex.value if index != self.initialRemotesIndex: index = int(index) rcType = config.inputDevices.remotesIndex.default if index == 0 else remoteControl.remotes[ index][REMOTE_RCTYPE] if rcType: remoteControl.writeRemoteControlType(rcType) print( "[InputDeviceSetup] Trying remote control index=%d, getMachineBuild='%s', rcType='%s', name='%s'." % (index, remoteControl.remotes[index][REMOTE_MODEL], remoteControl.remotes[index][REMOTE_RCTYPE], remoteControl.remotes[index][REMOTE_DISPLAY_NAME])) else: print( "[InputDeviceSetup] Remote control index=%d, getMachineBuild='%s', rcType='%s', name='%s' does not use rcType." % (index, remoteControl.remotes[index][REMOTE_MODEL], remoteControl.remotes[index][REMOTE_RCTYPE], remoteControl.remotes[index][REMOTE_DISPLAY_NAME])) self.session.openWithCallback( self.keySaveCallback, MessageBox, _("Is the remote control working okay?"), MessageBox.TYPE_YESNO, timeout=10, default=False, timeout_default=False) return Setup.keySave(self)
def keySave(self): if self.serviceVolumeOffsets != self.initialVolumeOffsets: # Save the volume configuration data if there are any changes. VolumeInstance.setServiceVolumeOffsets(self.serviceVolumeOffsets) Setup.keySave(self)
def keySaveCallback(self, answer): if answer: return Setup.keySave(self) self.restoreOldSetting()
def keySave(self): Setup.keySave(self) FCCChanged()
def keySave(self): if config.mediaplayer.defaultDir.value == "None": config.mediaplayer.defaultDir.value = "" Setup.keySave(self)
def keySave(self): config.hdmicec.save() Setup.keySave(self)