add VideoWindow Component
[enigma2.git] / lib / python / Components / NimManager.py
index 8769aae96d2a457ea139ca16645494f80eece437..950f48fdabd632c55c88c186c166658c7fbb2fec 100644 (file)
@@ -391,7 +391,7 @@ class NimManager:
                def startElement(self, name, attrs):
                        if (name == "terrestrial"):
                                #print "found sat " + attrs.get('name',"") + " " + str(attrs.get('position',""))
-                               tname = attrs.get('name',"")
+                               tname = attrs.get('name',"").encode("UTF-8")
                                tflags = attrs.get('flags',"")
                                self.terrestrialsList.append((tname, tflags))
                                self.parsedTer = str(tname)
@@ -422,9 +422,19 @@ class NimManager:
        def getTranspondersCable(self, cable):
                return self.transponderscable[cable]
 
+       def getTranspondersTerrestrial(self, region):
+               return self.transpondersterrestrial[region]
+       
        def getCableDescription(self, nim):
                return self.cablesList[config.Nims[nim].cable.value]
 
+       def getTerrestrialDescription(self, nim):
+               return self.terrestrialsList[config.Nims[nim].terrestrial.value][0]
+
+       def getTerrestrialFlags(self, nim):
+               return self.terrestrialsList[config.Nims[nim].terrestrial.value][1]
+
+
        def getConfiguredSats(self):
                return self.sec.getSatList()
 
@@ -477,6 +487,7 @@ class NimManager:
                                self.nimSocketCount += 1
                        elif line.strip().startswith("Type:"):
                                self.nimTypes[lastsocket] = str(line.strip()[6:])
+                               #self.nimTypes[lastsocket] = str("DVB-T")
                        elif line.strip().startswith("Name:"):
                                self.nimNames[lastsocket] = str(line.strip()[6:])
                        elif line.strip().startswith("empty"):
@@ -560,6 +571,9 @@ class NimManager:
 
        def getNimConfigMode(self, slotid):
                return currentConfigSelectionElement(config.Nims[slotid].configMode)
+       
+       def getSatList(self):
+               return self.satList
 
        def getSatListForNim(self, slotid):
                list = []
@@ -728,7 +742,10 @@ def InitNimManager(nimmgr):
                elif slot.nimType == nimmgr.nimType["DVB-C"]:
                        nim.cable = configElement(cname + "cable", configSelection, 0, nimmgr.cablesList, False);
                elif slot.nimType == nimmgr.nimType["DVB-T"]:
-                       nim.cable = configElement(cname + "terrestrial", configSelection, 0, nimmgr.terrestrialsList, False);
+                       list = []
+                       for x in nimmgr.terrestrialsList:
+                               list.append(x[0])
+                       nim.terrestrial = configElement(cname + "terrestrial", configSelection, 0, list, False);
                else:
                        print "pls add support for this frontend type!"