Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Kummer committed Mar 24, 2022
1 parent c0a5338 commit 376b692
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions BlenderUpdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,9 @@ def download(self, entry):
"""Download routines."""
global dir_

url = entry["url"]
version = entry["version"]
variation = entry["arch"]
url = "https://builder.blender.org/download/daily/" + entry

if version == installedversion:
if entry == installedversion:
reply = QtWidgets.QMessageBox.question(
self,
"Warning",
Expand Down Expand Up @@ -475,8 +473,8 @@ def download(self, entry):
global config
config.read("config.ini")
config.set("main", "path", dir_)
config.set("main", "flavor", variation)
config.set("main", "installed", version)
config.set("main", "flavor", entry)
config.set("main", "installed", entry)

with open("config.ini", "w") as f:
config.write(f)
Expand All @@ -487,11 +485,11 @@ def download(self, entry):
##########################

dir_ = os.path.join(dir_, "")
filename = "./blendertemp/" + entry["filename"]
filename = "./blendertemp/" + entry

for i in btn:
btn[i].hide()
logger.info(f"Starting download thread for {url}{version}")
logger.info(f"Starting download thread for {url}{entry}")

self.lbl_available.hide()
self.lbl_caution.hide()
Expand All @@ -502,7 +500,7 @@ def download(self, entry):
self.frm_progress.show()
nowpixmap = QtGui.QPixmap(":/newPrefix/images/Actions-arrow-right-icon.png")
self.lbl_download_pic.setPixmap(nowpixmap)
self.lbl_downloading.setText(f"<b>Downloading {version}</b>")
self.lbl_downloading.setText(f"<b>Downloading {entry}</b>")
self.progressBar.setValue(0)
self.btn_Check.setDisabled(True)
self.statusbar.showMessage(f"Downloading {size_readable}")
Expand Down

0 comments on commit 376b692

Please sign in to comment.