X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FPlugins%2FSystemPlugins%2FFirmwareUpgrade%2Fplugin.py;h=f3c28a7f06c980306b8966230d57dec3c5e7cadf;hb=02809fa01ec1684c77c9376a13719159043ba5cc;hp=ff593de80d1a83ac8e8ebe6eff228fd3d0604c88;hpb=046310e3051a490a5d423af43a22c9bbb9802129;p=vuplus_dvbapp diff --git a/lib/python/Plugins/SystemPlugins/FirmwareUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FirmwareUpgrade/plugin.py index ff593de..f3c28a7 100644 --- a/lib/python/Plugins/SystemPlugins/FirmwareUpgrade/plugin.py +++ b/lib/python/Plugins/SystemPlugins/FirmwareUpgrade/plugin.py @@ -28,12 +28,12 @@ if os.path.exists("/proc/stb/info/vumodel"): if info == "ultimo": fwlist= [ - ("fp", _("Front Processor")) - ,("fpga", _("FPGA")) + ("fpga", _("FPGA")) + ,("fp", _("Front Processor")) ] fwdata= { - "fp" : ["http://archive.vuplus.com/download/fp", "fp.files", "/dev/bcm_mu;"] - ,"fpga" : ["http://archive.vuplus.com/download/fpga", "fpga.files", "/dev/fpga_dp;/dev/misc/dp;"] + "fpga" : ["http://archive.vuplus.com/download/fpga", "fpga.files", "/dev/fpga_dp;/dev/misc/dp;"] + ,"fp" : ["http://archive.vuplus.com/download/fp", "fp.files", "/dev/bcm_mu;"] } elif info == "uno": fwlist= [ @@ -102,7 +102,7 @@ class UpgradeStatus(Screen): self.cbConfirmExit(False) return status = self.FU.getStatus() - if self.old_status > status: + if self.old_status > status and status != -1: self.session.open(MessageBox, _("Fail to upgrade!! Retry!!"), MessageBox.TYPE_INFO, timeout = 10) self.slider.setValue(status) self["status"].setText(_("%d / 100" % (status))) @@ -143,7 +143,7 @@ class Filebrowser(Screen): skin = """ - + @@ -154,7 +154,7 @@ class Filebrowser(Screen): Screen.__init__(self, session) self.session = session - self["key_blue"] = StaticText(_("Download")) + self["key_blue"] = StaticText(_("Download the firmware (latest)")) self["status"] = StaticText(_(" ")) self["file_list"] = FileList("/", matchingPattern = "^.*") @@ -237,7 +237,7 @@ class Filebrowser(Screen): # tf : target file name(string) # bd : target base directory(string) # cbfunc(string) : callback function(function) - def doDownload(self, uri, tf, bd='/tmp', cbfunc=None): + def doDownload(self, uri, tf, bd='/tmp', cbfunc=None, errmsg="Fail to download."): tar = bd + "/" + tf #print "[FirmwareUpgrade] - Download Info : [%s][%s]" % (uri, tar) def doHook(blockNumber, blockSize, totalSize) : @@ -247,13 +247,17 @@ class Filebrowser(Screen): try: opener.open(uri) except: - self.session.open(MessageBox, _("File not found in this URL:\n%s"%(uri)), MessageBox.TYPE_INFO, timeout = 10) + #self.session.open(MessageBox, _("File not found in this URL:\n%s"%(uri)), MessageBox.TYPE_INFO, timeout = 10) + print "[FirmwareUpgrade] - Fail to download. URL :",uri + self.session.open(MessageBox, _(errmsg), MessageBox.TYPE_INFO, timeout = 10) del opener return False try : f, h = urlretrieve(uri, tar, doHook) except IOError, msg: - self.session.open(MessageBox, _(str(msg)), MessageBox.TYPE_INFO, timeout = 10) + #self.session.open(MessageBox, _(str(msg)), MessageBox.TYPE_INFO, timeout = 10) + print "[FirmwareUpgrade] - Fail to download. ERR_MSG :",str(msg) + self.session.open(MessageBox, _(errmsg), MessageBox.TYPE_INFO, timeout = 10) del opener return False del opener @@ -298,12 +302,12 @@ class Filebrowser(Screen): os.system("rm -f /tmp/" + root_file) # md5 - if not self.doDownload(self.guri+".md5", self.gbin+".md5", cbfunc=cbDownloadDone): + if not self.doDownload(self.guri+".md5", self.gbin+".md5", cbfunc=cbDownloadDone, errmsg="Can't download the checksum file."): self.resetGUI() self.downloadLock = False return # data - if not self.doDownload(self.guri, self.gbin, cbfunc=cbDownloadDone): + if not self.doDownload(self.guri, self.gbin, cbfunc=cbDownloadDone, errmsg="Can't download the firmware file."): self.resetGUI() self.downloadLock = False return