def Plugins(**kwargs): """ Plugin loader(?) """ result = [ PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=on_start_session), PluginDescriptor(where=[PluginDescriptor.WHERE_NETWORKCONFIG_READ], fnc=on_network_configuration_read), ] screenwidth = getDesktop(0).size().width() if imagedistro == "openatv": result.append( PluginDescriptor(name=PLUGIN_NAME, description=_(PLUGIN_DESCRIPTION), where=PluginDescriptor.WHERE_MENU, fnc=on_main_menu)) if screenwidth and screenwidth >= 1920: result.append( PluginDescriptor(name=PLUGIN_NAME, description=_(PLUGIN_DESCRIPTION), icon=PLUGIN_ICON_HD, where=[PluginDescriptor.WHERE_PLUGINMENU], fnc=on_configure_plugin)) else: result.append( PluginDescriptor(name=PLUGIN_NAME, description=_(PLUGIN_DESCRIPTION), icon=PLUGIN_ICON, where=[PluginDescriptor.WHERE_PLUGINMENU], fnc=on_configure_plugin)) return result
def Plugins(**kwargs): result = [ PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=startSession), PluginDescriptor(where=[PluginDescriptor.WHERE_NETWORKCONFIG_READ], fnc=IfUpIfDown), ] screenwidth = getDesktop(0).size().width() if imagedistro in ("openatv"): result.append( PluginDescriptor(name="OpenWebif", description=_("OpenWebif Configuration"), where=PluginDescriptor.WHERE_MENU, fnc=main_menu)) if screenwidth and screenwidth == 1920: result.append( PluginDescriptor(name="OpenWebif", description=_("OpenWebif Configuration"), icon="openwebifhd.png", where=[PluginDescriptor.WHERE_PLUGINMENU], fnc=confplug)) else: result.append( PluginDescriptor(name="OpenWebif", description=_("OpenWebif Configuration"), icon="openwebif.png", where=[PluginDescriptor.WHERE_PLUGINMENU], fnc=confplug)) return result
def Plugins(**kwargs): result = [ PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=startSession), PluginDescriptor(where=[PluginDescriptor.WHERE_NETWORKCONFIG_READ], fnc=IfUpIfDown), ] screenwidth = getDesktop(0).size().width() if imagedistro in ("openatv"): result.append(PluginDescriptor(name="OpenWebif", description=_("OpenWebif Configuration"), where=PluginDescriptor.WHERE_MENU, fnc=main_menu)) if screenwidth and screenwidth == 1920: result.append(PluginDescriptor(name="OpenWebif", description=_("OpenWebif Configuration"), icon="openwebifhd.png", where=[PluginDescriptor.WHERE_PLUGINMENU], fnc=confplug)) else: result.append(PluginDescriptor(name="OpenWebif", description=_("OpenWebif Configuration"), icon="openwebif.png", where=[PluginDescriptor.WHERE_PLUGINMENU], fnc=confplug)) return result
def __init__(self, session): self.skin = OpenWebifConfig.skin Screen.__init__(self, session) self.list = [] ConfigListScreen.__init__(self, self.list) self["key_red"] = Label(_("Cancel")) self["key_green"] = Label(_("Save")) self["lab1"] = Label(_("OpenWebif url: http://yourip:port")) self["actions"] = ActionMap(["WizardActions", "ColorActions"], { "red": self.keyCancel, "back": self.keyCancel, "green": self.keySave, }, -2) self.runSetup() self.onLayoutFinish.append(self.setWindowTitle)
def runSetup(self): self.list = [] self.list.append( getConfigListEntry(_("OpenWebInterface Enabled"), config.OpenWebif.enabled)) if config.OpenWebif.enabled.value: self.list.append( getConfigListEntry(_("Show box name in header"), config.OpenWebif.identifier)) if config.OpenWebif.identifier.value: self.list.append( getConfigListEntry(_("Use custom box name"), config.OpenWebif.identifier_custom)) if config.OpenWebif.identifier_custom.value: self.list.append( getConfigListEntry(_("Custom box name"), config.OpenWebif.identifier_text)) self.list.append( getConfigListEntry(_("HTTP port"), config.OpenWebif.port)) self.list.append( getConfigListEntry(_("Add service name to stream information"), config.OpenWebif.service_name_for_stream)) if imagedistro in ("VTi-Team Image", ): self.list.append( getConfigListEntry(_("Character encoding for EPG data"), config.OpenWebif.epg_encoding)) self["config"].list = self.list self["config"].l.setList(self.list)
def setWindowTitle(self): self.setTitle(_("OpenWebif Configuration"))
def runSetup(self): self.list = [] self.list.append(getConfigListEntry(_("OpenWebInterface Enabled"), config.OpenWebif.enabled)) if config.OpenWebif.enabled.value: self.list.append(getConfigListEntry(_("Use new design"), config.OpenWebif.responsive_enabled)) self.list.append(getConfigListEntry(_("Show box name in header"), config.OpenWebif.identifier)) if config.OpenWebif.identifier.value: self.list.append(getConfigListEntry(_("Use custom box name"), config.OpenWebif.identifier_custom)) if config.OpenWebif.identifier_custom.value: self.list.append(getConfigListEntry(_("Custom box name"), config.OpenWebif.identifier_text)) self.list.append(getConfigListEntry(_("HTTP port"), config.OpenWebif.port)) self.list.append(getConfigListEntry(_("Enable HTTP Authentication"), config.OpenWebif.auth)) self.list.append(getConfigListEntry(_("Enable HTTPS"), config.OpenWebif.https_enabled)) if config.OpenWebif.https_enabled.value: self.list.append(getConfigListEntry(_("HTTPS port"), config.OpenWebif.https_port)) self.list.append(getConfigListEntry(_("Enable HTTPS Authentication"), config.OpenWebif.https_auth)) self.list.append(getConfigListEntry(_("Require client cert for HTTPS"), config.OpenWebif.https_clientcert)) if config.OpenWebif.auth.value: self.list.append(getConfigListEntry(_("Enable Authentication for streaming"), config.OpenWebif.auth_for_streaming)) self.list.append(getConfigListEntry(_("Disable remote access for user root"), config.OpenWebif.no_root_access)) if not config.OpenWebif.auth.value or (config.OpenWebif.https_enabled.value and not config.OpenWebif.https_auth.value): self.list.append(getConfigListEntry(_("Without auth only local access is allowed!"), config.OpenWebif.local_access_only)) self.list.append(getConfigListEntry(_("Enable access from VPNs"), config.OpenWebif.vpn_access)) self.list.append(getConfigListEntry(_("Enable Parental Control"), config.OpenWebif.parentalenabled)) self.list.append(getConfigListEntry(_("Add service name to stream information"), config.OpenWebif.service_name_for_stream)) if imagedistro in ("VTi-Team Image"): self.list.append(getConfigListEntry(_("Character encoding for EPG data"), config.OpenWebif.epg_encoding)) self.list.append(getConfigListEntry(_("Allow IPK Upload"), config.OpenWebif.allow_upload_ipk)) # FIXME Submenu # self.list.append(getConfigListEntry(_("Webinterface jQuery UI Theme"), config.OpenWebif.webcache.theme)) # self.list.append(getConfigListEntry(_("Movie List Sort"), config.OpenWebif.webcache.moviesort)) self["config"].list = self.list self["config"].l.setList(self.list)
def runSetup(self): self.list = [] self.list.append( getConfigListEntry(_("OpenWebInterface Enabled"), config.OpenWebif.enabled)) if config.OpenWebif.enabled.value: self.list.append( getConfigListEntry(_("Use new design"), config.OpenWebif.responsive_enabled)) self.list.append( getConfigListEntry(_("Show box name in header"), config.OpenWebif.identifier)) if config.OpenWebif.identifier.value: self.list.append( getConfigListEntry(_("Use custom box name"), config.OpenWebif.identifier_custom)) if config.OpenWebif.identifier_custom.value: self.list.append( getConfigListEntry(_("Custom box name"), config.OpenWebif.identifier_text)) self.list.append( getConfigListEntry(_("HTTP port"), config.OpenWebif.port)) self.list.append( getConfigListEntry(_("Enable HTTP Authentication"), config.OpenWebif.auth)) self.list.append( getConfigListEntry(_("Enable HTTPS"), config.OpenWebif.https_enabled)) if config.OpenWebif.https_enabled.value: self.list.append( getConfigListEntry(_("HTTPS port"), config.OpenWebif.https_port)) self.list.append( getConfigListEntry(_("Enable HTTPS Authentication"), config.OpenWebif.https_auth)) self.list.append( getConfigListEntry(_("Require client cert for HTTPS"), config.OpenWebif.https_clientcert)) if config.OpenWebif.auth.value: self.list.append( getConfigListEntry( _("Enable Authentication for streaming"), config.OpenWebif.auth_for_streaming)) self.list.append( getConfigListEntry( _("Disable remote access for user root"), config.OpenWebif.no_root_access)) if not config.OpenWebif.auth.value or ( config.OpenWebif.https_enabled.value and not config.OpenWebif.https_auth.value): self.list.append( getConfigListEntry( _("Without auth only local access is allowed!"), config.OpenWebif.local_access_only)) self.list.append( getConfigListEntry(_("Enable access from VPNs"), config.OpenWebif.vpn_access)) self.list.append( getConfigListEntry(_("Enable Parental Control"), config.OpenWebif.parentalenabled)) self.list.append( getConfigListEntry(_("Add service name to stream information"), config.OpenWebif.service_name_for_stream)) if imagedistro in ("VTi-Team Image"): self.list.append( getConfigListEntry(_("Character encoding for EPG data"), config.OpenWebif.epg_encoding)) self.list.append( getConfigListEntry(_("Allow IPK Upload"), config.OpenWebif.allow_upload_ipk)) # FIXME Submenu # self.list.append(getConfigListEntry(_("Webinterface jQuery UI Theme"), config.OpenWebif.webcache.theme)) # self.list.append(getConfigListEntry(_("Movie List Sort"), config.OpenWebif.webcache.moviesort)) self["config"].list = self.list self["config"].l.setList(self.list)
def setWindowTitle(self): self.setTitle(_(PLUGIN_WINDOW_TITLE))