コード例 #1
0
ファイル: Update.py プロジェクト: 4doemaster/enigma2
	def download(self, val=True, extStr=""):
		if val:
			# first download file must be rootfs
			if not extStr:
				self.removeDownloadDir()
				self.checkDepSW()

			self["menulist"].hide()
			if not extStr:
				self["text"].setText(_("Downloading \"%s\"\nIf you want to exit, press \"EXIT\" key in rcu") % self["menulist"].getCurrent())
				self.swPath = self.imageInfo[self.type]["imagedir"] + "/" + self["menulist"].getCurrent()
			else:
				self["text"].setText(_("Downloading \"%s\"\nIf you want to exit, press \"EXIT\" key in rcu") % extStr)
				self.swPath = self.imageInfo[self.type]["imagedir"] + "/." + self["menulist"].getCurrent() + "." + extStr
			self["text"].show()

			dlfile = self.getDownloadDir()
			if extStr == "cfe":
				dlfile += "/cfe/cfe.bin"
			elif extStr == "kernel":
				dlfile += "/cfe/oe_kernel.bin"
			else:
				dlfile += "/oe_rootfs.bin"
			self.downloadedSW[self.swPath] = (dlfile, self.getSWSize(self.swPath))
			MiniFTP_Thread.getInstance().DownloadFile(0, self.iface, self.SERVER_DNS, self.swPath, "anonymous", " ", dlfile)
			self.downloadingSW = True

			self.drawProgressBarTimer.start(1000, True)	
コード例 #2
0
ファイル: Update.py プロジェクト: digidudeofdw/enigma2-1
        def progressAction(configElement):
            num = int(configElement.value)
            if num == -1:
                self.drawProgressBarTimer.stop()
                MiniFTP_Thread.getInstance().Stop_Thread()
                self.downloadingSW = False
                self.downloadedSW = {}
            elif num < 100:
                self.drawProgressBarTimer.start(1000, True)
            elif num == 100:
                self.drawProgressBarTimer.stop()
                MiniFTP_Thread.getInstance().Stop_Thread()
                self.downloadingSW = False

                if self.downloadedSWSizeOk():
                    #					self.downloadBurn()
                    self.session.openWithCallback(
                        self.downloadBurn, MessageBox,
                        _("Downloading Finished!!\nDo you really want to update \nthe file \"%s\"?"
                          ) % self["menulist"].getCurrent())
                else:
                    self.session.open(
                        MessageBox,
                        _("Failed while checking downloaded SW!\nTry again please."
                          ), MessageBox.TYPE_ERROR)
                    self.downloadCancel(True)
コード例 #3
0
        def progressAction(configElement):
            num = int(configElement.value)
            if num == -1:
                self.drawProgressBarTimer.stop()
                MiniFTP_Thread.getInstance().Stop_Thread()
                self.downloadingSW = False
                self.hiddenSWNum = 0
                self.downloadedSW = {}
                self.removeDownloadDir()
            elif num < 100:
                self.drawProgressBarTimer.start(1000, True)
            elif num == 100:
                self.drawProgressBarTimer.stop()
                MiniFTP_Thread.getInstance().Stop_Thread()
                self.downloadingSW = False

                if len(self.existDepSWList):
                    self.download(extStr=self.existDepSWList.pop())
                else:
                    if self.downloadedSWSizeOk():
                        self.session.openWithCallback(self.downloadBurn,
                                                      UpdateModeChoice)
                    else:
                        self.session.open(
                            MessageBox,
                            _("Failed while checking downloaded SW!\nTry again please."
                              ), MessageBox.TYPE_ERROR)
                        self.downloadCancel(True)
コード例 #4
0
ファイル: Update.py プロジェクト: MOA-2011/enigma2.pli4.0
	def download(self, val=True):
		if val:
			self["menulist"].hide()
			self["text"].setText(_("Downloading \"%s\"\nIf you want to exit, press \"EXIT\" key in rcu") % self["menulist"].getCurrent())
			self.swPath = self.imageInfo[self.type]["imagedir"] + "/" + self["menulist"].getCurrent()
			self["text"].show()

			dlfile = "/tmp/update_files.tar"
			self.downloadedSW[self.swPath] = (dlfile, self.getSWSize(self.swPath))
			MiniFTP_Thread.getInstance().DownloadFile(0, self.iface, self.SERVER_DNS, self.swPath, "anonymous", " ", dlfile)
			self.downloadingSW = True

			self.drawProgressBarTimer.start(1000, True)	
コード例 #5
0
ファイル: Update.py プロジェクト: MOA-2011/enigma2.pli4.0
	def checkEnv(self):
		# server check
		if 0 == MiniFTP_Thread.getInstance().Alive_Check(0, self.SERVER_DNS):
			self.serverAlive = True
			self.loadSWList()
		else:
			self.serverAlive = False
			self.swList = []

		# draw menu
		self.drawMenu()
コード例 #6
0
ファイル: Update.py プロジェクト: MOA-2011/enigma2.pli4.0
		def progressAction(configElement):
			num = int(configElement.value)
			if num == -1:
				self.drawProgressBarTimer.stop()
				MiniFTP_Thread.getInstance().Stop_Thread();
				self.downloadingSW = False
				self.downloadedSW = {}
			elif num < 100:
				self.drawProgressBarTimer.start(1000, True)	
			elif num == 100:
				self.drawProgressBarTimer.stop()
				MiniFTP_Thread.getInstance().Stop_Thread();
				self.downloadingSW = False

				if self.downloadedSWSizeOk():
#					self.downloadBurn()
					self.session.openWithCallback(self.downloadBurn, MessageBox, _("Downloading Finished!!\nDo you really want to update \nthe file \"%s\"?") % self["menulist"].getCurrent())
				else:
					self.session.open(MessageBox, _("Failed while checking downloaded SW!\nTry again please."), MessageBox.TYPE_ERROR)
					self.downloadCancel(True)
コード例 #7
0
ファイル: Update.py プロジェクト: digidudeofdw/enigma2-1
    def download(self, val=True):
        if val:
            self["menulist"].hide()
            self["text"].setText(
                _("Downloading \"%s\"\nIf you want to exit, press \"EXIT\" key in rcu"
                  ) % self["menulist"].getCurrent())
            self.swPath = self.imageInfo[
                self.type]["imagedir"] + "/" + self["menulist"].getCurrent()
            self["text"].show()

            dlfile = "/tmp/update_files.tar"
            self.downloadedSW[self.swPath] = (dlfile,
                                              self.getSWSize(self.swPath))
            MiniFTP_Thread.getInstance().DownloadFile(0, self.iface,
                                                      self.SERVER_DNS,
                                                      self.swPath, "anonymous",
                                                      " ", dlfile)
            self.downloadingSW = True

            self.drawProgressBarTimer.start(1000, True)
コード例 #8
0
ファイル: Update.py プロジェクト: digidudeofdw/enigma2-1
    def checkEnv(self):
        # server check
        if 0 == MiniFTP_Thread.getInstance().Alive_Check(0, self.SERVER_DNS):
            self.serverAlive = True
            self.loadSWList()
        else:
            self.serverAlive = False
            self.swList = []

        # draw menu
        self.drawMenu()
コード例 #9
0
    def download(self, val=True, extStr=""):
        if val:
            # first download file must be rootfs
            if not extStr:
                self.removeDownloadDir()
                self.checkDepSW()

            self["menulist"].hide()
            if not extStr:
                self["text"].setText(
                    _("Downloading \"%s\"\nIf you want to exit, press \"EXIT\" key in rcu"
                      ) % self["menulist"].getCurrent())
                self.swPath = self.imageInfo[self.type][
                    "imagedir"] + "/" + self["menulist"].getCurrent()
            else:
                self["text"].setText(
                    _("Downloading \"%s\"\nIf you want to exit, press \"EXIT\" key in rcu"
                      ) % extStr)
                self.swPath = self.imageInfo[
                    self.type]["imagedir"] + "/." + self[
                        "menulist"].getCurrent() + "." + extStr
            self["text"].show()

            dlfile = self.getDownloadDir()
            if extStr == "cfe":
                dlfile += "/cfe/cfe.bin"
            elif extStr == "kernel":
                dlfile += "/cfe/oe_kernel.bin"
            else:
                dlfile += "/oe_rootfs.bin"
            self.downloadedSW[self.swPath] = (dlfile,
                                              self.getSWSize(self.swPath))
            MiniFTP_Thread.getInstance().DownloadFile(0, self.iface,
                                                      self.SERVER_DNS,
                                                      self.swPath, "anonymous",
                                                      " ", dlfile)
            self.downloadingSW = True

            self.drawProgressBarTimer.start(1000, True)
コード例 #10
0
ファイル: Update.py プロジェクト: 4doemaster/enigma2
		def progressAction(configElement):
			num = int(configElement.value)
			if num == -1:
				self.drawProgressBarTimer.stop()
				MiniFTP_Thread.getInstance().Stop_Thread();
				self.downloadingSW = False
				self.hiddenSWNum = 0
				self.downloadedSW = {}
				self.removeDownloadDir()
			elif num < 100:
				self.drawProgressBarTimer.start(1000, True)	
			elif num == 100:
				self.drawProgressBarTimer.stop()
				MiniFTP_Thread.getInstance().Stop_Thread();
				self.downloadingSW = False

				if len(self.existDepSWList):
					self.download(extStr=self.existDepSWList.pop())
				else:
					if self.downloadedSWSizeOk():
						self.session.openWithCallback(self.downloadBurn, UpdateModeChoice)
					else:
						self.session.open(MessageBox, _("Failed while checking downloaded SW!\nTry again please."), MessageBox.TYPE_ERROR)
						self.downloadCancel(True)
コード例 #11
0
ファイル: Update.py プロジェクト: 4doemaster/enigma2
	def checkEnv(self):
		# server check
		if 0 == MiniFTP_Thread.getInstance().Alive_Check(0, self.SERVER_DNS):
			self.serverAlive = True
			self.loadSWList()
		else:
			self.serverAlive = False
			self.swList = []

		# hdd check
		hddList = self.getHddList() 
		for hdd in hddList:
			if self.isFileSystemSupported(hdd=hdd[1]):
				self.hddList.append(hdd)
		config.swupdate.downloadlocation.setChoices(self.hddList)

		# draw menu
		self.drawMenu()
コード例 #12
0
    def checkEnv(self):
        # server check
        if 0 == MiniFTP_Thread.getInstance().Alive_Check(0, self.SERVER_DNS):
            self.serverAlive = True
            self.loadSWList()
        else:
            self.serverAlive = False
            self.swList = []

        # hdd check
        hddList = self.getHddList()
        for hdd in hddList:
            if self.isFileSystemSupported(hdd=hdd[1]):
                self.hddList.append(hdd)
        config.swupdate.downloadlocation.setChoices(self.hddList)

        # draw menu
        self.drawMenu()
コード例 #13
0
ファイル: Update.py プロジェクト: MOA-2011/enigma2.pli4.0
	def drawProgressBar(self):
		config.progress.value = str(MiniFTP_Thread.getInstance().GetState())
コード例 #14
0
ファイル: Update.py プロジェクト: digidudeofdw/enigma2-1
 def drawProgressBar(self):
     config.progress.value = str(MiniFTP_Thread.getInstance().GetState())