From 1c3b40438b6f70881382e28f14bf102154fdf3ff Mon Sep 17 00:00:00 2001 From: Aphelion <61633628+AphelionWasTaken@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:10:00 -0600 Subject: [PATCH] Use actual chunk size for visuals --- .github/workflows/build.yml | 6 +++--- PySN.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 722e294..d9507c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,10 +35,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v2.1.6 - release_name: v2.1.6 + tag_name: v2.1.7 + release_name: v2.1.7 body: | - Split the firmware search into multiple funcitons. + Update the download bar and status based on actual chunk size. draft: false prerelease: false - name: Upload Release Asset diff --git a/PySN.py b/PySN.py index 31676a0..29f6d16 100644 --- a/PySN.py +++ b/PySN.py @@ -485,7 +485,7 @@ def search_ps3_fw(self, console): root_list = self.request_fw(console) #Split the text in the text file by ; and pull strings that match certain criteria. - if root_list: + if root_list[0] != 0: for root in root_list: text = root.string.split(';') for item in text: @@ -618,8 +618,8 @@ def download_updates(self, url, download_path, size, sha1, index, title_id, name if chunk: f.write(chunk) f.flush() - i = i+(1/(size/(1024*1024))) - h = round(h+((1024*1024)/1024000),2) + i = i+(1/(size/(len(chunk)))) + h = round(h+((len(chunk))/1024000),2) self.textbox.prog_bar_list[index].set(i) self.textbox.status_list[index].configure(text_color = 'green', text= str(h) + '/' + str(round((size/1024000),2)) + 'MB' ) if self.textbox.queue_list[index].empty() == False: break