Merge remote branch 'dm/experimental' into vuplus_experimental
[vuplus_dvbapp] / lib / python / Plugins / SystemPlugins / Blindscan / plugin.py
1 from Plugins.Plugin import PluginDescriptor
2
3 from Screens.Screen import Screen
4 from Screens.ServiceScan import ServiceScan
5 from Screens.MessageBox import MessageBox
6 from Screens.DefaultWizard import DefaultWizard
7
8 from Components.Label import Label
9 from Components.TuneTest import Tuner
10 from Components.ConfigList import ConfigListScreen
11 from Components.Sources.StaticText import StaticText
12 from Components.ActionMap import NumberActionMap, ActionMap
13 from Components.NimManager import nimmanager, getConfigSatlist
14 from Components.config import config, ConfigSubsection, ConfigSelection, ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable
15
16 from Tools.HardwareInfo import HardwareInfo
17 from Tools.Directories import resolveFilename, SCOPE_DEFAULTPARTITIONMOUNTDIR, SCOPE_DEFAULTDIR, SCOPE_DEFAULTPARTITION
18
19 from enigma import eTimer, eDVBFrontendParametersSatellite, eComponentScan, eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eConsoleAppContainer, eDVBResourceManager
20
21 class Blindscan(ConfigListScreen, Screen):
22         skin="""
23                 <screen name="Blindscan" position="center,center" size="560,290" title="Blindscan">
24                         <ePixmap pixmap="Vu_HD/buttons/red.png" position="5,0" size="140,40" alphatest="on" />
25                         <ePixmap pixmap="Vu_HD/buttons/green.png" position="145,0" size="140,40" alphatest="on" />
26                         <ePixmap pixmap="Vu_HD/buttons/button_off.png" position="285,0" size="140,40" alphatest="on" />
27                         <ePixmap pixmap="Vu_HD/buttons/blue.png" position="425,0" size="140,40" alphatest="on" />
28                         <widget source="key_red" render="Label" position="20,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
29                         <widget source="key_green" render="Label" position="160,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
30                         <widget source="key_blue" render="Label" position="440,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
31                         <widget name="config" position="5,50" size="550,200" scrollbarMode="showOnDemand" />
32                         <widget name="introduction" position="0,265" size="560,20" font="Regular;20" halign="center" />
33                 </screen>
34                 """
35         def __init__(self, session): 
36                 Screen.__init__(self, session)
37
38                 self.current_play_service = self.session.nav.getCurrentlyPlayingServiceReference()
39
40                 # update sat list
41                 self.satList = []
42                 for slot in nimmanager.nim_slots:
43                         if slot.isCompatible("DVB-S"):
44                                 self.satList.append(nimmanager.getSatListForNim(slot.slot))
45
46                 # make config
47                 self.createConfig()
48
49                 self.list = []
50                 self.status = ""
51
52                 ConfigListScreen.__init__(self, self.list)
53                 if self.scan_nims.value != None and self.scan_nims.value != "" :
54                         self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", ],
55                         {
56                                 "red": self.keyCancel,
57                                 "green": self.keyGo,
58                                 "blue":self.keyGoAll,
59                                 "ok": self.keyGo,
60                                 "cancel": self.keyCancel,
61                         }, -2)
62                         self["key_red"] = StaticText(_("Exit"))
63                         self["key_green"] = StaticText("Start")
64                         self["key_blue"] = StaticText("Scan All")
65                         self["introduction"] = Label(_("Press Green/OK to start the scan"))
66                         self.createSetup()
67                 else :
68                         self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", ],
69                         {
70                                 "red": self.keyCancel,
71                                 "green": self.keyNone,
72                                 "blue":self.keyNone,
73                                 "ok": self.keyNone,
74                                 "cancel": self.keyCancel,
75                         }, -2)
76                         self["key_red"] = StaticText(_("Exit"))
77                         self["key_green"] = StaticText(" ")
78                         self["key_blue"] = StaticText(" ")
79                         self["introduction"] = Label(_("Please setup your tuner configuration."))
80
81         def keyNone(self):
82                 None
83         def callbackNone(self, *retval):
84                 None
85
86         def openFrontend(self):
87                 res_mgr = eDVBResourceManager.getInstance()
88                 if res_mgr:
89                         self.raw_channel = res_mgr.allocateRawChannel(self.feid)
90                         if self.raw_channel:
91                                 self.frontend = self.raw_channel.getFrontend()
92                                 if self.frontend:
93                                         return True
94                                 else:
95                                         print "getFrontend failed"
96                         else:
97                                 print "getRawChannel failed"
98                 else:
99                         print "getResourceManager instance failed"
100                 return False
101
102         def createConfig(self):
103                 self.feinfo = None
104                 frontendData = None
105                 defaultSat = {
106                         "orbpos": 192,
107                         "system": eDVBFrontendParametersSatellite.System_DVB_S,
108                         "frequency": 11836,
109                         "inversion": eDVBFrontendParametersSatellite.Inversion_Unknown,
110                         "symbolrate": 27500,
111                         "polarization": eDVBFrontendParametersSatellite.Polarisation_Horizontal,
112                         "fec": eDVBFrontendParametersSatellite.FEC_Auto,
113                         "fec_s2": eDVBFrontendParametersSatellite.FEC_9_10,
114                         "modulation": eDVBFrontendParametersSatellite.Modulation_QPSK 
115                 }
116
117                 self.service = self.session.nav.getCurrentService()
118                 if self.service is not None:
119                         self.feinfo = self.service.frontendInfo()
120                         frontendData = self.feinfo and self.feinfo.getAll(True)
121                 if frontendData is not None:
122                         ttype = frontendData.get("tuner_type", "UNKNOWN")
123                         if ttype == "DVB-S":
124                                 defaultSat["system"] = frontendData.get("system", eDVBFrontendParametersSatellite.System_DVB_S)
125                                 defaultSat["frequency"] = frontendData.get("frequency", 0) / 1000
126                                 defaultSat["inversion"] = frontendData.get("inversion", eDVBFrontendParametersSatellite.Inversion_Unknown)
127                                 defaultSat["symbolrate"] = frontendData.get("symbol_rate", 0) / 1000
128                                 defaultSat["polarization"] = frontendData.get("polarization", eDVBFrontendParametersSatellite.Polarisation_Horizontal)
129                                 if defaultSat["system"] == eDVBFrontendParametersSatellite.System_DVB_S2:
130                                         defaultSat["fec_s2"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
131                                         defaultSat["rolloff"] = frontendData.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35)
132                                         defaultSat["pilot"] = frontendData.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown)
133                                 else:
134                                         defaultSat["fec"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
135                                 defaultSat["modulation"] = frontendData.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)
136                                 defaultSat["orbpos"] = frontendData.get("orbital_position", 0)
137                 del self.feinfo
138                 del self.service
139                 del frontendData
140                 
141                 self.scan_sat = ConfigSubsection()
142                 self.scan_networkScan = ConfigYesNo(default = False)
143                 
144                 # blindscan add
145                 self.blindscan_hi = ConfigSelection(default = "hi_low", choices = [("low", _("low")), ("high", _("high")), ("hi_low", _("hi_low"))])
146
147                 #ConfigYesNo(default = True)
148                 self.blindscan_start_frequency = ConfigInteger(default = 950*1000000)
149                 self.blindscan_stop_frequency = ConfigInteger(default = 2150*1000000)
150                 self.blindscan_start_symbol = ConfigInteger(default = 2*1000000)
151                 self.blindscan_stop_symbol = ConfigInteger(default = 45*1000000)
152
153                 # collect all nims which are *not* set to "nothing"
154                 nim_list = []
155                 for n in nimmanager.nim_slots:
156                         if n.config_mode == "nothing":
157                                 continue
158                         if n.config_mode == "advanced" and len(nimmanager.getSatListForNim(n.slot)) < 1:
159                                 continue
160                         if n.config_mode in ("loopthrough", "satposdepends"):
161                                 root_id = nimmanager.sec.getRoot(n.slot_id, int(n.config.connectedTo.value))
162                                 if n.type == nimmanager.nim_slots[root_id].type: # check if connected from a DVB-S to DVB-S2 Nim or vice versa
163                                         continue
164                         nim_list.append((str(n.slot), n.friendly_full_description))
165
166                 self.scan_nims = ConfigSelection(choices = nim_list)
167
168                 # sat
169                 self.scan_sat.frequency = ConfigInteger(default = defaultSat["frequency"], limits = (1, 99999))
170                 #self.scan_sat.polarization = ConfigSelection(default = defaultSat["polarization"], choices = [
171                 self.scan_sat.polarization = ConfigSelection(default = eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, choices = [
172                         (eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, _("horizontal_vertical")),
173                         (eDVBFrontendParametersSatellite.Polarisation_Horizontal, _("horizontal")),
174                         (eDVBFrontendParametersSatellite.Polarisation_Vertical, _("vertical")),
175                         (eDVBFrontendParametersSatellite.Polarisation_CircularLeft, _("circular left")),
176                         (eDVBFrontendParametersSatellite.Polarisation_CircularRight, _("circular right"))])
177                 self.scan_scansat = {}
178                 for sat in nimmanager.satList:
179                         self.scan_scansat[sat[0]] = ConfigYesNo(default = False)
180                 
181                 self.scan_satselection = []
182                 for slot in nimmanager.nim_slots:
183                         if slot.isCompatible("DVB-S"):
184                                 self.scan_satselection.append(getConfigSatlist(defaultSat["orbpos"], self.satList[slot.slot]))
185                 return True
186
187         def createSetup(self):
188                 self.list = []
189                 self.multiscanlist = []
190                 index_to_scan = int(self.scan_nims.value)
191                 print "ID: ", index_to_scan
192
193                 self.tunerEntry = getConfigListEntry(_("Tuner"), self.scan_nims)
194                 self.list.append(self.tunerEntry)
195                 
196                 if self.scan_nims == [ ]:
197                         return
198                 
199                 self.systemEntry = None
200                 self.modulationEntry = None
201                 nim = nimmanager.nim_slots[index_to_scan]
202
203                 self.scan_networkScan.value = False
204                 if nim.isCompatible("DVB-S") :
205                         self.list.append(getConfigListEntry(_('Satellite'), self.scan_satselection[index_to_scan]))
206                         self.list.append(getConfigListEntry(_('Scan start frequency'), self.blindscan_start_frequency))
207                         self.list.append(getConfigListEntry(_('Scan stop frequency'), self.blindscan_stop_frequency))
208                         self.list.append(getConfigListEntry(_("Polarity"), self.scan_sat.polarization))
209                         self.list.append(getConfigListEntry(_("Scan band"), self.blindscan_hi))
210                         self.list.append(getConfigListEntry(_('Scan start symbolrate'), self.blindscan_start_symbol))
211                         self.list.append(getConfigListEntry(_('Scan stop symbolrate'), self.blindscan_stop_symbol))
212                         self["config"].list = self.list
213                         self["config"].l.setList(self.list)
214                         
215         def newConfig(self):
216                 cur = self["config"].getCurrent()
217                 print "cur is", cur
218                 if cur == self.tunerEntry or \
219                         cur == self.systemEntry or \
220                         (self.modulationEntry and self.systemEntry[1].value == eDVBFrontendParametersSatellite.System_DVB_S2 and cur == self.modulationEntry):
221                         self.createSetup()
222
223         def checkSettings(self):
224                 if self.blindscan_start_frequency.value < 950*1000000 or self.blindscan_start_frequency.value > 2150*1000000 :
225                         self.session.open(MessageBox, _("Please check again.\nStart frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
226                         return False
227                 if self.blindscan_stop_frequency.value < 950*1000000 or self.blindscan_stop_frequency.value > 2150*1000000 :
228                         self.session.open(MessageBox, _("Please check again.\nStop frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
229                         return False
230                 if self.blindscan_start_frequency.value > self.blindscan_stop_frequency.value :
231                         self.session.open(MessageBox, _("Please check again.\nFrequency : start value is larger than stop value."), MessageBox.TYPE_ERROR)
232                         return False
233                 if self.blindscan_start_symbol.value < 2*1000000 or self.blindscan_start_symbol.value > 45*1000000 :
234                         self.session.open(MessageBox, _("Please check again.\nStart symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
235                         return False
236                 if self.blindscan_stop_symbol.value < 2*1000000 or self.blindscan_stop_symbol.value > 45*1000000 :
237                         self.session.open(MessageBox, _("Please check again.\nStop symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
238                         return False
239                 if self.blindscan_start_symbol.value > self.blindscan_stop_symbol.value :
240                         self.session.open(MessageBox, _("Please check again.\nSymbolrate : start value is larger than stop value."), MessageBox.TYPE_ERROR)
241                         return False
242                 return True
243
244         def keyLeft(self):
245                 ConfigListScreen.keyLeft(self)
246                 self.newConfig()
247
248         def keyRight(self):
249                 ConfigListScreen.keyRight(self)
250                 self.newConfig()
251                         
252         def keyCancel(self):
253                 self.session.nav.playService(self.current_play_service)
254                 for x in self["config"].list:
255                         x[1].cancel()
256                 self.close()
257
258         def keyGo(self):
259                 if self.checkSettings() == False:
260                         return
261
262                 tab_pol = {
263                         eDVBFrontendParametersSatellite.Polarisation_Horizontal : "horizontal", 
264                         eDVBFrontendParametersSatellite.Polarisation_Vertical : "vertical",
265                         eDVBFrontendParametersSatellite.Polarisation_CircularLeft : "circular left",
266                         eDVBFrontendParametersSatellite.Polarisation_CircularRight : "circular right",
267                         eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1 : "horizontal_vertical"
268                 }
269
270                 self.tmp_tplist=[]
271                 tmp_pol = []
272                 tmp_band = []
273                 tmp_list=[self.satList[0][self.scan_satselection[0].index]]
274                 
275                 if self.blindscan_hi.value == "hi_low" :
276                         tmp_band=["low","high"]
277                 else:
278                         tmp_band=[self.blindscan_hi.value]
279                         
280                 if self.scan_sat.polarization.value ==  eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1 : 
281                         tmp_pol=["horizontal","vertical"]
282                 else:
283                         tmp_pol=[tab_pol[self.scan_sat.polarization.value]]
284
285                 self.doRun(tmp_list, tmp_pol, tmp_band)
286                 
287         def keyGoAll(self):
288                 if self.checkSettings() == False:
289                         return
290
291                 self.tmp_tplist=[]
292                 tmp_list=[]
293                 tmp_band=["low","high"]
294                 tmp_pol=["horizontal","vertical"]
295                 for slot in nimmanager.nim_slots:
296                         if slot.isCompatible("DVB-S"):
297                                 for s in self.satList[slot.slot]:
298                                         tmp_list.append(s)
299
300                 self.doRun(tmp_list, tmp_pol, tmp_band)
301                 
302         def doRun(self, tmp_list, tmp_pol, tmp_band):
303                 self.full_data = ""
304                 self.total_list=[]
305                 for x in tmp_list:
306                         for y in tmp_pol:
307                                 for z in tmp_band:
308                                         self.total_list.append([x,y,z])
309                                         print "add scan item : ", x, ", ", y, ", ", z
310
311                 self.max_count = len(self.total_list)
312                 self.is_runable = True
313                 self.running_count = 0
314                 self.clockTimer = eTimer()
315                 self.clockTimer.callback.append(self.doClock)
316                 self.clockTimer.start(1000)
317
318         def doClock(self):
319                 is_scan = False
320                 if self.is_runable :
321                         if self.running_count >= self.max_count:
322                                 self.clockTimer.stop()
323                                 del self.clockTimer
324                                 self.clockTimer = None
325                                 print "Done"
326                                 return
327                         orb = self.total_list[self.running_count][0]
328                         pol = self.total_list[self.running_count][1]
329                         band = self.total_list[self.running_count][2]
330                         self.running_count = self.running_count + 1
331                         print "running status-[%d] : [%d][%s][%s]" %(self.running_count, orb[0], pol, band)
332                         if self.running_count == self.max_count:
333                                 is_scan = True
334                         self.prepareScanData(orb, pol, band, is_scan)
335
336         def prepareScanData(self, orb, pol, band, is_scan):
337                 self.is_runable = False
338                 self.orb_position = orb[0]
339                 self.feid = int(self.scan_nims.value)
340                 tab_hilow = {"high" : 1, "low" : 0}
341                 tab_pol = {
342                         "horizontal" : eDVBFrontendParametersSatellite.Polarisation_Horizontal, 
343                         "vertical" : eDVBFrontendParametersSatellite.Polarisation_Vertical,
344                         "circular left" : eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
345                         "circular right" : eDVBFrontendParametersSatellite.Polarisation_CircularRight
346                 }
347
348                 returnvalue = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
349
350                 if not self.openFrontend():
351                         self.oldref = self.session.nav.getCurrentlyPlayingServiceReference()
352                         self.session.nav.stopService()
353                         if not self.openFrontend():
354                                 if self.session.pipshown:
355                                         self.session.pipshown = False
356                                         del self.session.pip
357                                         if not self.openFrontend():
358                                                 self.frontend = None
359                 self.tuner = Tuner(self.frontend)
360
361                 if tab_hilow[band]:
362                         self.scan_sat.frequency.value = 12515
363                 else:
364                         self.scan_sat.frequency.value = 11015
365                 returnvalue = (self.scan_sat.frequency.value,
366                                          0,
367                                          tab_pol[pol],
368                                          0,
369                                          0,
370                                          orb[0],
371                                          eDVBFrontendParametersSatellite.System_DVB_S,
372                                          0,
373                                          0,
374                                          0)
375                 self.tuner.tune(returnvalue)
376
377                 cmd = "vuplus_blindscan %d %d %d %d %d %d %d" % (self.blindscan_start_frequency.value/1000000, self.blindscan_stop_frequency.value/1000000, self.blindscan_start_symbol.value/1000000, self.blindscan_stop_symbol.value/1000000, tab_pol[pol], tab_hilow[band], self.feid)
378                 print "prepared command : [%s]" % (cmd)
379                 self.blindscan_container = eConsoleAppContainer()
380                 self.blindscan_container.appClosed.append(self.blindscanContainerClose)
381                 self.blindscan_container.dataAvail.append(self.blindscanContainerAvail)
382                 self.blindscan_container.execute(cmd)
383
384                 tmpstr = "Look for available transponders.\nThis works will take several minutes.\n\n   - Current Status : %d/%d\n   - Orbital Positions : %s\n   - Polarization : %s\n   - Bandwidth : %s" %(self.running_count, self.max_count, orb[1], pol, band)
385                 if is_scan :
386                         self.blindscan_session = self.session.openWithCallback(self.blindscanSessionClose, MessageBox, _(tmpstr), MessageBox.TYPE_INFO)
387                 else:
388                         self.blindscan_session = self.session.openWithCallback(self.blindscanSessionNone, MessageBox, _(tmpstr), MessageBox.TYPE_INFO)
389
390         def blindscanContainerClose(self, retval):
391                 lines = self.full_data.split('\n')
392                 for line in lines:
393                         data = line.split()
394                         print "cnt :", len(data), ", data :", data
395                         if len(data) >= 10:
396                                 if data[0] == 'OK':
397                                         parm = eDVBFrontendParametersSatellite()
398                                         sys = { "DVB-S" : eDVBFrontendParametersSatellite.System_DVB_S,
399                                                 "DVB-S2" : eDVBFrontendParametersSatellite.System_DVB_S2}
400                                         qam = { "QPSK" : parm.Modulation_QPSK,
401                                                 "8PSK" : parm.Modulation_8PSK}
402                                         inv = { "INVERSION_OFF" : parm.Inversion_Off,
403                                                 "INVERSION_ON" : parm.Inversion_On,
404                                                 "INVERSION_AUTO" : parm.Inversion_Unknown}
405                                         fec = { "FEC_AUTO" : parm.FEC_Auto,
406                                                 "FEC_1_2" : parm.FEC_1_2,
407                                                 "FEC_2_3" : parm.FEC_2_3,
408                                                 "FEC_3_4" : parm.FEC_3_4,
409                                                 "FEC_5_6": parm.FEC_5_6,
410                                                 "FEC_7_8" : parm.FEC_7_8,
411                                                 "FEC_8_9" : parm.FEC_8_9,
412                                                 "FEC_3_5" : parm.FEC_3_5,
413                                                 "FEC_9_10" : parm.FEC_9_10,
414                                                 "FEC_NONE" : parm.FEC_None}
415                                         roll ={ "ROLLOFF_20" : parm.RollOff_alpha_0_20,
416                                                 "ROLLOFF_25" : parm.RollOff_alpha_0_25,
417                                                 "ROLLOFF_35" : parm.RollOff_alpha_0_35}
418                                         pilot={ "PILOT_ON" : parm.Pilot_On,
419                                                 "PILOT_OFF" : parm.Pilot_Off}
420                                         pol = { "HORIZONTAL" : parm.Polarisation_Horizontal,
421                                                 "VERTICAL" : parm.Polarisation_Vertical}
422                                         parm.orbital_position = self.orb_position
423                                         parm.polarisation = pol[data[1]]
424                                         parm.frequency = int(data[2])
425                                         parm.symbol_rate = int(data[3])
426                                         parm.system = sys[data[4]]
427                                         parm.inversion = inv[data[5]]
428                                         parm.pilot = pilot[data[6]]
429                                         parm.fec = fec[data[7]]
430                                         parm.modulation = qam[data[8]]
431                                         parm.rolloff = roll[data[9]]
432                                         self.tmp_tplist.append(parm)
433                 self.blindscan_session.close(True)
434
435         def blindscanContainerAvail(self, str):
436                 self.full_data = self.full_data + str
437
438         def blindscanSessionNone(self, *val):
439                 import time
440                 self.blindscan_container.sendCtrlC()
441                 self.blindscan_container = None
442                 time.sleep(2)
443
444                 if self.frontend:
445                         self.frontend = None
446                         del self.raw_channel
447
448                 if val[0] == False:
449                         self.tmp_tplist = []
450                         self.running_count = self.max_count
451
452                 self.is_runable = True
453
454         def blindscanSessionClose(self, *val):
455                 self.blindscanSessionNone(val[0])
456
457                 if self.tmp_tplist != None and self.tmp_tplist != []:
458                         for p in self.tmp_tplist:
459                                 print "data : [%d][%d][%d][%d][%d][%d][%d][%d][%d][%d]" % (p.orbital_position, p.polarisation, p.frequency, p.symbol_rate, p.system, p.inversion, p.pilot, p.fec, p.modulation, p.modulation)
460
461                         self.startScan(self.tmp_tplist, self.feid)
462                 else:
463                         msg = "No found transponders!!\nPlease check the satellite connection, or scan other search condition." 
464                         if val[0] == False:
465                                 msg = "Blindscan was canceled by the user."
466                         self.session.openWithCallback(self.callbackNone, MessageBox, _(msg), MessageBox.TYPE_INFO, timeout=10)
467                         self.tmp_tplist = []
468
469         def startScan(self, tlist, feid, networkid = 0):
470                 self.scan_session = None
471                 self.session.open(ServiceScan, [{"transponders": tlist, "feid": feid, "flags": 0, "networkid": networkid}])
472
473 def main(session, **kwargs):
474         session.open(Blindscan)
475                                                            
476 def Plugins(**kwargs):            
477         return PluginDescriptor(name=_("Blindscan"), description="scan type(DVB-S)", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
478