diff --git a/app.py b/app.py index afcec86..158305f 100644 --- a/app.py +++ b/app.py @@ -87,6 +87,8 @@ class AnimeWwise(QMainWindow): sys.stdout = TextEditStream(self.console) self.extract = extract.WwiseExtract() self.checkUpdates() + self.totalProgress.setMaximum(10000) + self.fileProgress.setMaximum(10000) # utils self.selectFolder = lambda: QFileDialog.getExistingDirectory(self, "Select Folder") @@ -210,10 +212,13 @@ class AnimeWwise(QMainWindow): # workers @pyqtSlot(list) def progressBarSlot(self, progress): + progress_value = math.ceil(progress[1]*100) if progress[0] == "total": - self.totalProgress.setValue(math.ceil(progress[1])) + self.totalProgress.setValue(progress_value) + self.totalProgress.setFormat("%.02f %%" % (progress_value / 100)) elif progress[0] == "file": - self.fileProgress.setValue(math.ceil(progress[1])) + self.fileProgress.setValue(progress_value) + self.fileProgress.setFormat("%.02f %%" % (progress_value / 100)) @pyqtSlot(dict) def handleFinished(self, data): diff --git a/extract.py b/extract.py index 85e2f57..2b4d3c7 100644 --- a/extract.py +++ b/extract.py @@ -371,8 +371,8 @@ class WwiseExtract: def update_progress(self, current, total, step): base = 100 / self.steps - self.progress(["total", current * base // total + base * (step - 1)]) - self.progress(["file", current * 100 // total]) + self.progress(["total", current * base / total + base * (step - 1)]) + self.progress(["file", current * 100 / total]) def reset(self): self.mapper = None