getConfigListEntry now supports more than two arguments
[enigma2.git] / lib / python / Components / TunerInfo.py
index 53cb3d90b8f94e30f594c4e9c5bb3d66fa0d40af..490b9bef7c33924ab798ffc536bc5969f9363d8f 100644 (file)
@@ -1,6 +1,6 @@
 from GUIComponent import GUIComponent
 
-from enigma import eLabel, eSlider, iFrontendStatusInformation
+from enigma import eLabel, eSlider, iFrontendInformation
 
 from math import log
 
@@ -74,27 +74,27 @@ class TunerInfo(GUIComponent):
                if self.servicefkt is not None:
                        service = self.servicefkt()
                        if service is not None:
-                               feinfo = service.frontendStatusInfo()
+                               feinfo = service.frontendInfo()
                                if feinfo is not None:
                                        if what == self.SNR:
-                                               return feinfo.getFrontendInfo(iFrontendStatusInformation.signalPower)
+                                               return feinfo.getFrontendInfo(iFrontendInformation.signalPower)
                                        elif what == self.AGC:
-                                               return feinfo.getFrontendInfo(iFrontendStatusInformation.signalQuality)
+                                               return feinfo.getFrontendInfo(iFrontendInformation.signalQuality)
                                        elif what == self.BER:
-                                               return feinfo.getFrontendInfo(iFrontendStatusInformation.bitErrorRate)
+                                               return feinfo.getFrontendInfo(iFrontendInformation.bitErrorRate)
                                        elif what == self.LOCK:
-                                               return feinfo.getFrontendInfo(iFrontendStatusInformation.LockState)
+                                               return feinfo.getFrontendInfo(iFrontendInformation.lockState)
                elif self.frontendfkt is not None:
                        frontend = self.frontendfkt()
-                       if what == self.SNR:
-                               return frontend.readFrontendData(iFrontendStatusInformation.signalPower)
-                       elif what == self.AGC:
-                               return frontend.readFrontendData(iFrontendStatusInformation.signalQuality)
-                       elif what == self.BER:
-                               return frontend.readFrontendData(iFrontendStatusInformation.bitErrorRate)
-                       elif what == self.LOCK:
-                               return frontend.readFrontendData(iFrontendStatusInformation.LockState)
-               
+                       if frontend:
+                               if what == self.SNR:
+                                       return frontend.readFrontendData(iFrontendInformation.signalPower)
+                               elif what == self.AGC:
+                                       return frontend.readFrontendData(iFrontendInformation.signalQuality)
+                               elif what == self.BER:
+                                       return frontend.readFrontendData(iFrontendInformation.bitErrorRate)
+                               elif what == self.LOCK:
+                                       return frontend.readFrontendData(iFrontendInformation.lockState)
                return 0
                                
        def createWidget(self, parent):