diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15c42ff..6bfd091 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,18 +103,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v2.5.1 - release_name: v2.5.1 + tag_name: v2.5.2 + release_name: v2.5.2 body: | - Add a total progress bar to the UI that shows the overall progress of all downloads. - - Fix reversed "Download All" button behavior. - - Fix a race condition that could occur when searching while downloading. - - Stop downloads from completing if the user interrupts them with a search if the list is cleared. - - Some additional cleanup. + Fix an issue with the download all button where it was stopping at entries without widgets. draft: false prerelease: false diff --git a/PySN.py b/PySN.py index df23f0d..af72780 100644 --- a/PySN.py +++ b/PySN.py @@ -768,9 +768,15 @@ def cancel(self, dl_button, q): q.put(ButtonAction.STOP) #Creates directories, updates buttons, downloads the update file, and checks the hash. - def download_updates(self, url, download_path, size, sha1, index, title_id, name, console, fileloc, sem, prog_bar, status, dl_button, open_button, q): + def download_updates(self, url, download_path, size, sha1, index, title_id, name, console, fileloc, sem): if size > 0: with sem: + prog_bar = self.textbox.prog_bar_list[index] + status = self.textbox.status_list[index] + dl_button = self.textbox.dlbutton_list[index] + open_button = self.textbox.open_button_list[index] + q = self.textbox.queue_list[index] + def try_configure(widget, **kwargs): try: widget.configure(**kwargs) @@ -792,6 +798,7 @@ def try_set(widget, val): last_ui_update = 0 downloaded_bytes = 0 size_mb = f"{round(size / 1024000, 2)}" + cancelled = False #send a request to the update files URL. Handle threads and download behavior based on the button state. with self.session.get(url, stream=True, verify=False) as r: @@ -895,16 +902,10 @@ def button_search(self): self._search_thread.start() #Behavior for the Download button. - def frame_button_download(self, game_name, title_id, url, console, update_size, sha1, index, download_path, fileloc): - prog_bar = self.textbox.prog_bar_list[index] - status = self.textbox.status_list[index] - dl_button = self.textbox.dlbutton_list[index] - open_button = self.textbox.open_button_list[index] - q = self.textbox.queue_list[index] - + def frame_button_download(self, game_name, title_id, url, console, update_size, sha1, index, download_path, fileloc): with self._download_lock: self.total_download_size = self.total_download_size + update_size - threading.Thread(target = self.download_updates, args=(url, download_path, update_size, sha1, index, title_id, game_name, console, fileloc, self.download_semaphore, prog_bar, status, dl_button, open_button, q), daemon = True).start() + threading.Thread(target = self.download_updates, args=(url, download_path, update_size, sha1, index, title_id, game_name, console, fileloc, self.download_semaphore), daemon = True).start() #Behavior for the Download All button. Opens the download all window. def button_downall(self):