def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index is self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index is self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"19e-23e-basis": "Astra1 Astra3 basis", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird", "kabelnl": "Kabel-NL"} self.channellist_type = ConfigSelection(choices = modes, default = "19e-23e-basis") self.createMenu() elif self.index is self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default = True) modes = {"wicardd": _("default") + " (Wicard)", "oscam-ymod": "Oscam-Ymod", "mgcamd": "Mgcamd", "cccam": "Cccam"} self.softcam_type = ConfigSelection(choices = modes, default = "wicardd") self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"ESI": "ESI default(13e-19e)", "19e": "Astra 1", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"} self.channellist_type = ConfigSelection(choices = modes, default = "ESI") self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"19e": "Astra 1", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"} self.channellist_type = ConfigSelection(choices = modes, default = "19e") self.createMenu() elif self.index == self.STATE_CHOISE_PICONS: self.enabled = ConfigYesNo(default = True) modes = {"19e": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"} self.picons_type = ConfigSelection(choices = modes, default = "19e") self.createMenu() elif self.index == self.STATE_CHOISE_EPG: self.enabled = ConfigYesNo(default = True) modes = {"xmltvimport": "Xmltvimport", "crossepg": "CrossEPG"} self.epg_type = ConfigSelection(choices = modes, default = "xmltvimport") self.createMenu() elif self.index == self.STATE_CHOISE_TDT: self.enabled = ConfigYesNo(default = True) modes = {"siano": "Siano", "Volar Black": "Hauppauge"} self.tdt_type = ConfigSelection(choices = modes, default = "siano") self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default = True) modes = {"cccam": "CCcam", "oscam": "Oscam"} self.softcam_type = ConfigSelection(choices = modes, default = "cccam") self.createMenu() elif self.index == self.STATE_CHOISE_CACHE: self.enabled = ConfigYesNo(default = True) modes = {"multics": "MultiCS"} self.cache_type = ConfigSelection(choices = modes, default = "multics") self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"sfteam": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"} self.channellist_type = ConfigSelection(choices = modes, default = "sfteam") self.createMenu() elif self.index == self.STATE_CHOISE_PICONS: self.enabled = ConfigYesNo(default = True) modes = {"220x132.black-white": "Astra 19e - Black White 220x132", "220x132.white-black": "Astra 19e - White Black 220x132", "220x132.blue-black": "Astra 19e - Blue Black 220x132", "220x132.reflection-black": "Astra 19e - Reflection Black 220x132", "220x132.transparent-black": "Astra 19e - Transparent Black 220x132", "220x132.transparent-white": "Astra 19e - Transparent White 220x132"} self.picons_type = ConfigSelection(choices = modes, default = "220x132.black-white") self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default = True) modes = {"cccam230": "CCcam 2.3.0", "cccam221": "CCcam 2.2.1","cccam214": "CCcam 2.1.4","mgcamd": "MGcamd 1.30d","evocamd": "Evocamd 2.1.7","rqcamd": "RQcamd 1.3.1","scam": "Scam 3.5.3",} self.softcam_type = ConfigSelection(choices = modes, default = "cccam230") self.createMenu() elif self.index == self.STATE_CHOISE_CARDSERVER: self.enabled = ConfigYesNo(default = True) modes = {"oscam": "OScam","newcs167": "NewCS 1.6.7"} self.cardserver_type = ConfigSelection(choices = modes, default = "oscam") self.createMenu() elif self.index == self.STATE_CHOISE_MBOOT: self.enabled = ConfigYesNo(default = True) modes = {"openmultiboot": "OpenMultiBoot"} self.cache_type = ConfigSelection(choices = modes, default = "openmultiboot") self.createMenu() elif self.index == self.STATE_CHOISE_HBBTV: self.enabled = ConfigYesNo(default = True) modes = {"browser": "Install"} self.hbbtv_type = ConfigSelection(choices = modes, default = "browser") self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"19e": "SAT: 19e", "19e-13e": "SAT: 19e 13e", "19e-13e-5e-75e": "SAT: 19e 13e 5e 75e", "19e-16e-13e": "SAT: 19e 13e 16e", "42e-19e-13e-7e": "SAT: 42e 19e 13e 7e"} self.channellist_type = ConfigSelection(choices = modes, default = "19e") self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default = True) modes = {"oscam": _("default") + " (Oscam)", "cccam": "CCcam", "scam": "scam"} self.softcam_type = ConfigSelection(choices = modes, default = "oscam") self.createMenu()
def restartLan(self): iNetwork.restartNetwork(self.restartLanDataAvail) self.restartLanRef = self.session.openWithCallback( self.restartfinishedCB, MessageBox, _("Please wait while your network is restarting..."), type=MessageBox.TYPE_INFO, enable_input=False)
def checkNetwork(self): if self.adapters: self.adapter = self.adapters.pop(0) if iNetwork.getAdapterAttribute(self.adapter, 'up'): iNetwork.checkNetworkState(self.checkNetworkStateCallback) else: iNetwork.restartNetwork(self.restartNetworkCallback) else: self.createMenu()
def restartLan(self): iNetwork.restartNetwork(self.restartLanDataAvail) self.restartLanRef = self.session.openWithCallback( self.restartfinishedCB, MessageBox, _("Please wait while your network is restarting..."), type=MessageBox.TYPE_INFO, enable_input=False, )
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) self.ipConfigEntry = ConfigIP(default=[0, 0, 0, 0]) self.interface = 'eth0' if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: ' '} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip')) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True self.interface = x[1] else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default=True) modes = {'henksat-19e': 'Astra 1', 'henksat-23e': 'Astra 3', 'henksat-19e-23e': 'Astra 1 Astra 3', 'henksat-19e-23e-28e': 'Astra 1 Astra 2 Astra 3', 'henksat-13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'} self.channellist_type = ConfigSelection(choices=modes, default='henksat-13e-19e-23e-28e') self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default=True) modes = {'oscam': _('default') + ' OSCam', 'cccam': 'CCcam', 'gbox': 'GBox', 'wicardd': 'Wicardd', 'mgcamd': 'MGCamd'} if getBoxType() in 'vusolo4k': modes = {'oscam': _('default') + ' OSCam', 'wicardd': 'Wicardd'} if getBoxType() in 'wetekplay': modes = {'oscam': _('default') + ' OSCam'} self.softcam_type = ConfigSelection(choices=modes, default='oscam') self.createMenu()
def __init__(self, session, args=None): Screen.__init__(self, session) self.index = args self.list = [] self.doNextStep = False ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [(iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP( default=iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default=True) modes = { "19e-23e-basis": "Astra1 Astra3 basis", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird", "kabelnl": "Kabel-NL" } self.channellist_type = ConfigSelection(choices=modes, default="19e-23e-basis") self.createMenu() elif self.index == self.INSTALL_PLUGINS: self.noplugins = ConfigNothing() self.doplugins = ConfigNothing() self.createMenu() elif self.index == self.SCAN: self.noscan = ConfigNothing() self.autoscan = ConfigNothing() self.manualscan = ConfigNothing() self.fastscan = ConfigNothing() self.cablescan = ConfigNothing() self.createMenu()
def __init__(self, session, args=None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [(iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP( default=iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOICE_CHANNELLIST: self.enabled = ConfigYesNo(default=True, graphic=False) modes = { "19e": "Astra 19.2e", "19e-13e": "Astra 19.2e Hotbird 13.0e", "kabel-bw": "Kabel BW", "kabeldeutschland": " Kabel Deutschland", "unity-media": "Kabel Unitymedia" } self.channellist_type = ConfigSelection(choices=modes, default="19e-13e") self.createMenu() # elif self.index == self.STATE_CHOICE_SOFTCAM: # self.enabled = ConfigYesNo(default = False) # self.createMenu() elif self.index == self.INSTALL_PLUGINS: self.enabled = ConfigYesNo(default=True) self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: ' '} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip')) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default=True) modes = {'19e': 'Astra 1', '23e': 'Astra 3', '19e-23e': 'Astra 1 Astra 3', '19e-23e-28e': 'Astra 1 Astra 2 Astra 3', '13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'} self.channellist_type = ConfigSelection(choices=modes, default='19e') self.createMenu() elif self.index == self.STATE_CHOISE_SETTINGPLUGIN: self.enabled = ConfigYesNo(default=True) modes = {'isettinge2': 'iSettingE2', 'cyrussettings': 'Cyrus Setting'} self.pluginsetting_type = ConfigSelection(choices=modes, default='isettinge2') self.createMenu() elif self.index == self.STATE_CHOISE_MULTIBOOTPLUGIN: self.enabled = ConfigYesNo(default=True) modes = {'multiboot': 'ItalySat Multiboot', 'openmultiboot': 'OpenMultiboot'} self.pluginmultiboot_type = ConfigSelection(choices=modes, default='multiboot') self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break elif x[1] == 'wlan0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"default-ventonsupport": "Default Germany", "henksat-19e": "Astra 1", "henksat-23e": "Astra 3", "henksat-19e-23e": "Astra 1 Astra 3", "henksat-19e-23e-28e": "Astra 1 Astra 2 Astra 3", "henksat-13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"} self.channellist_type = ConfigSelection(choices = modes, default = "default-ventonsupport") self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default = True) modes = {"cccam": _("default") + " (CCcam)", "gbox": "GBox", "wicardd": "Wicardd"} self.softcam_type = ConfigSelection(choices = modes, default = "cccam") self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] self.doNextStep = False ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True, graphic = False) modes = {"19e-23e-basis": "Astra1 Astra3 basis", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird", "kabelnl": "Kabel-NL"} self.channellist_type = ConfigSelection(choices = modes, default = "19e-23e-basis") self.createMenu() elif self.index == self.INSTALL_PLUGINS: self.noplugins = ConfigNothing() self.doplugins = ConfigNothing() self.createMenu() elif self.index == self.SCAN: self.noscan = ConfigNothing() self.autoscan = ConfigNothing() self.manualscan = ConfigNothing() self.fastscan = ConfigNothing() self.cablescan = ConfigNothing() self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOICE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = { "19e": "Astra 19.2e", "19e-13e": "Astra 19.2e Hotbird 13.0e", "kabel-bw": "Kabel BW", "kabeldeutschland": " Kabel Deutschland", "unity-media": "Kabel Unitymedia" } self.channellist_type = ConfigSelection(choices = modes, default = "19e-13e") self.createMenu() # elif self.index == self.STATE_CHOICE_SOFTCAM: # self.enabled = ConfigYesNo(default = False) # self.createMenu() elif self.index == self.INSTALL_PLUGINS: self.enabled = ConfigYesNo(default = True) self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"unibox": "Astra/Eutelsat", "henksat-19e": "Astra 1", "henksat-23e": "Astra 3", "henksat-19e-23e": "Astra 1 Astra 3", "henksat-19e-23e-28e": "Astra 1 Astra 2 Astra 3", "henksat-13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"} self.channellist_type = ConfigSelection(choices = modes, default = "unibox") self.createMenu() # elif self.index == self.STATE_CHOISE_SOFTCAM: # self.enabled = ConfigYesNo(default = True) # modes = {"cccam": _("default") + " (CCcam)", "scam": "scam"} # self.softcam_type = ConfigSelection(choices = modes, default = "cccam") # self.createMenu() elif self.index == self.STATE_CHOISE_IMAGE_UPGRADE: modes = {"yes": _(" "), "no": _(" ")} modes2 = {"yes": _(" "), "no": _(" ")} self.enabled = ConfigSelection(choices = modes, default = "yes") self.enabled2 = ConfigSelection(choices = modes2, default = "no") self.createMenu()
def __init__(self, session, args=None): Screen.__init__(self, session) print("installwizard starts") self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [(iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList()] is_found = False if os.path.isfile("/tmp/netwizardselection"): f = open('/tmp/netwizardselection', 'r') adapx1 = f.read() f.close() adapx1 = adapx1.replace('\n', '') print("adapx1:", adapx1) else: adapx1 = 'eth0' print("adapx1+1:", adapx1) for x in self.adapters: if adapx1 == 'eth0': if iNetwork.getAdapterAttribute(adapx1, 'up'): self.ipConfigEntry = ConfigIP( default=iNetwork.getAdapterAttribute(adapx1, "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break elif adapx1 == 'wlan0': if iNetwork.getAdapterAttribute(adapx1, 'up'): self.ipConfigEntry = ConfigIP( default=iNetwork.getAdapterAttribute(adapx1, "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break elif adapx1 == 'ra0': if iNetwork.getAdapterAttribute(adapx1, 'up'): self.ipConfigEntry = ConfigIP( default=iNetwork.getAdapterAttribute(adapx1, "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default=True) modes = {"default": _("OpenNFR List"), "scan": _("scan new")} self.channellist_type = ConfigSelection(choices=modes, default="default") self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) self.ipConfigEntry = ConfigIP(default=[0, 0, 0, 0]) self.interface = 'eth0' if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: ' '} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ] is_found = False for x in self.adapters: if x[1] == 'eth0' or x[1] == 'eth1' or x[1] == 'wlan0' or x[1] == 'ra0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip')) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True self.interface = x[1] else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default=True) modes = {'default-ventonsupport': 'Default Germany', 'henksat-19e': 'Astra 1', 'henksat-23e': 'Astra 3', 'henksat-19e-23e': 'Astra 1 Astra 3', 'henksat-19e-23e-28e': 'Astra 1 Astra 2 Astra 3', 'henksat-13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'} self.channellist_type = ConfigSelection(choices=modes, default='henksat-13e-19e-23e-28e') self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break elif x[1] == 'wlan0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break elif x[1] == 'ra0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default = True) modes = {"default-ventonsupport": "Default Germany", "henksat-19e": "Astra 1", "henksat-23e": "Astra 3", "henksat-19e-23e": "Astra 1 Astra 3", "henksat-19e-23e-28e": "Astra 1 Astra 2 Astra 3", "henksat-13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"} self.channellist_type = ConfigSelection(choices = modes, default = "default-ventonsupport") self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default = True) modes = {"cccam": _("default") + " (CCcam)", "gbox": "GBox", "wicardd": "Wicardd"} self.softcam_type = ConfigSelection(choices = modes, default = "cccam") self.createMenu()
def __init__(self, session, args = None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices = modes, default = 0) self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] is_found = False if os.path.isfile("/tmp/netwizardselection"): f = open('/tmp/netwizardselection', 'r') adapx1 = f.read() f.close() adapx1 = adapx1.replace('\n','') print "adapx1:", adapx1 else: adapx1 = 'eth0' print "adapx1+1:", adapx1 for x in self.adapters: if adapx1 == 'eth0': if iNetwork.getAdapterAttribute(adapx1, 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break elif adapx1 == 'wlan0': if iNetwork.getAdapterAttribute(adapx1, 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break elif adapx1 == 'ra0': if iNetwork.getAdapterAttribute(adapx1, 'up'): self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu()
def restartLan(self): print "[SOFTWARE MANAGER] Restart Network" iNetwork.restartNetwork(self.restartLanDataAvail)
def __init__(self, session, args=None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [(iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP( default=iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default=True) modes = { "sfteam": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird" } self.channellist_type = ConfigSelection(choices=modes, default="sfteam") self.createMenu() elif self.index == self.STATE_CHOISE_PICONS: self.enabled = ConfigYesNo(default=True) modes = { "220x132.black-white": "Astra 19e - Black White 220x132", "220x132.white-black": "Astra 19e - White Black 220x132", "220x132.blue-black": "Astra 19e - Blue Black 220x132", "220x132.reflection-black": "Astra 19e - Reflection Black 220x132", "220x132.transparent-black": "Astra 19e - Transparent Black 220x132", "220x132.transparent-white": "Astra 19e - Transparent White 220x132" } self.picons_type = ConfigSelection(choices=modes, default="220x132.black-white") self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default=True) modes = { "cccam230": "CCcam 2.3.0", "cccam221": "CCcam 2.2.1", "cccam214": "CCcam 2.1.4", "mgcamd": "MGcamd 1.30d", "evocamd": "Evocamd 2.1.7", "rqcamd": "RQcamd 1.3.1", "scam": "Scam 3.5.3", } self.softcam_type = ConfigSelection(choices=modes, default="cccam230") self.createMenu() elif self.index == self.STATE_CHOISE_CARDSERVER: self.enabled = ConfigYesNo(default=True) modes = {"oscam": "OScam", "newcs167": "NewCS 1.6.7"} self.cardserver_type = ConfigSelection(choices=modes, default="oscam") self.createMenu() elif self.index == self.STATE_CHOISE_MBOOT: self.enabled = ConfigYesNo(default=True) modes = {"openmultiboot": "OpenMultiBoot"} self.cache_type = ConfigSelection(choices=modes, default="openmultiboot") self.createMenu() elif self.index == self.STATE_CHOISE_HBBTV: self.enabled = ConfigYesNo(default=True) modes = {"browser": "Install"} self.hbbtv_type = ConfigSelection(choices=modes, default="browser") self.createMenu()
def __init__(self, session, args=None): Screen.__init__(self, session) self.index = args self.list = [] ConfigListScreen.__init__(self, self.list) if self.index == self.STATE_UPDATE: config.misc.installwizard.hasnetwork.value = False config.misc.installwizard.ipkgloaded.value = False modes = {0: " "} self.enabled = ConfigSelection(choices=modes, default=0) self.adapters = [(iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList()] is_found = False for x in self.adapters: if x[1] == 'eth0': if iNetwork.getAdapterAttribute(x[1], 'up'): self.ipConfigEntry = ConfigIP( default=iNetwork.getAdapterAttribute(x[1], "ip")) iNetwork.checkNetworkState(self.checkNetworkCB) if_found = True else: iNetwork.restartNetwork(self.checkNetworkLinkCB) break if is_found is False: self.createMenu() elif self.index == self.STATE_CHOISE_CHANNELLIST: self.enabled = ConfigYesNo(default=True) modes = { "19e": "Astra 1", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird" } self.channellist_type = ConfigSelection(choices=modes, default="19e") self.createMenu() elif self.index == self.STATE_CHOISE_PICONS: self.enabled = ConfigYesNo(default=True) modes = { "19e": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird" } self.picons_type = ConfigSelection(choices=modes, default="19e") self.createMenu() elif self.index == self.STATE_CHOISE_EPG: self.enabled = ConfigYesNo(default=True) modes = {"xmltvimport": "Xmltvimport", "crossepg": "CrossEPG"} self.epg_type = ConfigSelection(choices=modes, default="xmltvimport") self.createMenu() elif self.index == self.STATE_CHOISE_TDT: self.enabled = ConfigYesNo(default=True) modes = {"siano": "Siano", "Volar Black": "Hauppauge"} self.tdt_type = ConfigSelection(choices=modes, default="siano") self.createMenu() elif self.index == self.STATE_CHOISE_SOFTCAM: self.enabled = ConfigYesNo(default=True) modes = {"cccam": "CCcam", "oscam": "Oscam"} self.softcam_type = ConfigSelection(choices=modes, default="cccam") self.createMenu() elif self.index == self.STATE_CHOISE_CACHE: self.enabled = ConfigYesNo(default=True) modes = {"multics": "MultiCS"} self.cache_type = ConfigSelection(choices=modes, default="multics") self.createMenu()
def restartLan(self): iNetwork.restartNetwork(self.restartLanDataAvail)
def cbConfirmDone(self, ret): if not ret: return if self["key_green"].getText() == 'Connect': networkAdapters = iNetwork.getConfiguredAdapters() for x in networkAdapters: if x[:3] == 'ppp': continue iNetwork.setAdapterAttribute(x, "up", False) iNetwork.deactivateInterface(x) x = {} try: x = self["menulist"].getCurrent()[1] except: printInfoModemMgr('no selected device..') return devFile = '/usr/share/usb_modeswitch/%s:%s' % (x.get("Vendor"), x.get("ProdID")) if not os.path.exists(devFile) : message = "Can't found device file!! [%s]" % (devFile) printInfoModemMgr(message) #self.session.open(MessageBox, _(message), MessageBox.TYPE_INFO) return if self["key_green"].getText() == 'Disconnect': cmd = "%s 0" % (commandBin) self.taskManager.append(cmd, self.cbPrintAvail, self.cbPrintClose) cmd = "%s 1" % (commandBin) self.taskManager.append(cmd, self.cbPrintAvail, self.cbUnloadClose) self.taskManager.setStatusCB(self.setDisconnectStatus) self['myip'].setText(_('IP : 0.0.0.0')) # After Disconnect turn on all adapters and restart network networkAdapters = iNetwork.getConfiguredAdapters() for x in networkAdapters: iNetwork.setAdapterAttribute(x, "up", True) iNetwork.activateInterface(x) iNetwork.restartNetwork() else: cmd = "%s 2 vendor=0x%s product=0x%s" % (commandBin, x.get("Vendor"), x.get("ProdID")) self.taskManager.append(cmd, self.cbStep1PrintAvail, self.cbPrintClose) cmd = "%s 3 %s %s" % (commandBin, x.get("Vendor"), x.get("ProdID")) # do not save new vendor id and product id changed by usb-switchmode, use only 1st ones ( when no /dev/ttyUSB0 ) - it appears ONLY when it is switched to GSM MODE if not fileExists("/dev/ttyUSB0"): # SAVE Current Connection vendor and product ids for future Auto-Connect mode config.plugins.gmodemmanager.vendorid.setValue(x.get("Vendor")) config.plugins.gmodemmanager.productid.setValue(x.get("ProdID")) config.plugins.gmodemmanager.vendorid.save() config.plugins.gmodemmanager.productid.save() self.taskManager.append(cmd, self.cbPrintAvail, self.cbPrintClose) cmd = "%s 4" % (commandBin) self.taskManager.append(cmd, self.cbStep3PrintAvail, self.cbMakeWvDialClose) cmd = "%s 5" % (commandBin) self.taskManager.append(cmd, self.cbRunWvDialAvail, self.cbPrintClose) self.taskManager.setStatusCB(self.setConnectStatus) self.taskManager.next()
def restartLan(self): print"[SOFTWARE MANAGER] Restart Network" iNetwork.restartNetwork(self.restartLanDataAvail)