X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FScanSetup.py;h=7fb3e7400f8d4c6f4313fc3c8eb5310a40c965aa;hp=d0af8f7ecadf90ac05a19a20f304c02c453432b3;hb=9bcad45ba1ad98b73f0a2e369b240c9ebedd129d;hpb=4e8e33fafaf71b55b71fb6762baddfc0c7a38225 diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index d0af8f7..7fb3e74 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -113,6 +113,7 @@ class CableTransponderSearchSupport: def cableTransponderSearchSessionClosed(self, *val): print "cableTransponderSearchSessionClosed, val", val + self.resetTimeout() self.cable_search_container.appClosed.remove(self.cableTransponderSearchClosed) self.cable_search_container.dataAvail.remove(self.getCableTransponderData) self.cable_search_container = None @@ -138,7 +139,8 @@ class CableTransponderSearchSupport: "QAM128" : parm.Modulation_QAM128, "QAM256" : parm.Modulation_QAM256 } inv = { "INVERSION_OFF" : parm.Inversion_Off, - "INVERSION_ON" : parm.Inversion_On } + "INVERSION_ON" : parm.Inversion_On, + "INVERSION_AUTO" : parm.Inversion_Unknown } fec = { "FEC_AUTO" : parm.FEC_Auto, "FEC_1_2" : parm.FEC_1_2, "FEC_2_3" : parm.FEC_2_3, @@ -159,6 +161,19 @@ class CableTransponderSearchSupport: tmpstr += " kHz " tmpstr += data[0] self.cable_search_session["text"].setText(tmpstr) + + def setTimeout(self): + try: + self.oldtimeoutvalue = open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "r").readline() + open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write("0") + except: + print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available" + + def resetTimeout(self): + try: + open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write(self.oldtimeoutvalue) + except: + print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available" def startCableTransponderSearch(self, nim_idx): if not self.tryGetRawFrontend(nim_idx): @@ -242,6 +257,7 @@ class CableTransponderSearchSupport: self.cable_search_container.execute(cmd) tmpstr = _("Try to find used transponders in cable network.. please wait...") tmpstr += "\n\n..." + self.setTimeout() self.cable_search_session = self.session.openWithCallback(self.cableTransponderSearchSessionClosed, MessageBox, tmpstr, MessageBox.TYPE_INFO) class DefaultSatLists(DefaultWizard): @@ -295,9 +311,11 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): self.list = [] ConfigListScreen.__init__(self, self.list) - self.createSetup() - - self["introduction"] = Label(_("Press OK to start the scan")) + if not self.scan_nims.value == "": + self.createSetup() + self["introduction"] = Label(_("Press OK to start the scan")) + else: + self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan.")) def runAsync(self, finished_cb): self.finished_cb = finished_cb @@ -522,6 +540,8 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): for n in nimmanager.nim_slots: if n.config_mode == "nothing": continue + if n.config_mode == "advanced" and len(nimmanager.getSatListForNim(n.slot)) < 1: + continue if n.config_mode in ("loopthrough", "satposdepends"): root_id = nimmanager.sec.getRoot(n.slot_id, int(n.config.connectedTo.value)) if n.type == nimmanager.nim_slots[root_id].type: # check if connected from a DVB-S to DVB-S2 Nim or vice versa @@ -709,6 +729,8 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): tlist.append(buildTerTransponder(*args, **kwargs)) def keyGo(self): + if self.scan_nims.value == "": + return tlist = [] flags = None startScan = True