moving the list generation to a seperate method
[enigma2.git] / lib / python / Components / ServiceScan.py
index 915a26a..24bbc10 100644 (file)
@@ -26,19 +26,20 @@ class ServiceScan:
                                        self.state = self.Error
                                        self.errorcode = errcode
                        else:
-                               self.text.setText("scan in progress - %d %% done!\n%d services found!" % (self.scan.getProgress(), self.scan.getNumServices()))
+                               self.text.setText(_("scan in progress - %d %% done!\n%d services found!") % (self.scan.getProgress(), self.scan.getNumServices()))
                
                if self.state == self.Done:
-                       self.text.setText("scan done!")
+                       self.text.setText(_("scan done!"))
                
                if self.state == self.Error:
-                       self.text.setText("ERROR - failed to scan (%s)!" % (self.Errors[self.errorcode]) )
+                       self.text.setText(_("ERROR - failed to scan (%s)!") % (self.Errors[self.errorcode]) )
        
-       def __init__(self, progressbar, text, transponders, flags):
+       def __init__(self, progressbar, text, transponders, feid, flags):
                self.progressbar = progressbar
                self.text = text
                self.scan = eComponentScan()
                self.state = self.Idle
+               self.feid = feid
                self.flags = flags
                self.scanStatusChanged()
                
@@ -74,7 +75,7 @@ class ServiceScan:
        def execBegin(self):
                self.scan.statusChanged.get().append(self.scanStatusChanged)
                self.state = self.Running
-               err = self.scan.start(self.flags)
+               err = self.scan.start(self.feid, self.flags)
                if err:
                        self.state = self.Error
                        self.errorcode = 0
@@ -85,8 +86,9 @@ class ServiceScan:
                self.scan.statusChanged.get().remove(self.scanStatusChanged)
                if not self.isDone():
                        print "*** warning *** scan was not finished!"
+               
+               del self.scan
 
        def isDone(self):
                print "state is %d " % (self.state)
                return self.state == self.Done or self.state == self.Error
-