diff --git a/rare/components/tabs/downloads/__init__.py b/rare/components/tabs/downloads/__init__.py index a506ec67..7017ebc3 100644 --- a/rare/components/tabs/downloads/__init__.py +++ b/rare/components/tabs/downloads/__init__.py @@ -102,7 +102,7 @@ class DownloadsTab(QWidget): @pyqtSlot(str) @pyqtSlot(RareGame) - def __add_update(self, update: Union[str,RareGame]): + def __add_update(self, update: Union[str, RareGame]): if isinstance(update, str): update = self.rcore.get_game(update) if update.metadata.auto_update or QSettings().value("auto_update", False, bool): @@ -192,12 +192,12 @@ class DownloadsTab(QWidget): if item.expired: self.__refresh_download(item) return - thread = DlThread(item, self.rcore.get_game(item.options.app_name), self.core, self.args.debug) - thread.result.connect(self.__on_download_result) - thread.progress.connect(self.__on_download_progress) - thread.finished.connect(thread.deleteLater) - thread.start() - self.__thread = thread + dl_thread = DlThread(item, self.rcore.get_game(item.options.app_name), self.core, self.args.debug) + dl_thread.result.connect(self.__on_download_result) + dl_thread.progress.connect(self.__on_download_progress) + dl_thread.finished.connect(dl_thread.deleteLater) + dl_thread.start() + self.__thread = dl_thread self.download_widget.ui.kill_button.setDisabled(False) self.download_widget.ui.dl_name.setText(item.download.game.app_title) self.download_widget.setPixmap( diff --git a/rare/lgndr/models/downloading.py b/rare/lgndr/models/downloading.py index 2b5dc37b..dce6c7af 100644 --- a/rare/lgndr/models/downloading.py +++ b/rare/lgndr/models/downloading.py @@ -5,8 +5,8 @@ from typing import Optional @dataclass class UIUpdate: """ - Status update object sent from the manager to the CLI/GUI to update status indicators - Inheritance doesn't work due to optional arguments in UIUpdate proper + Status update object sent from the manager to the CLI/GUI to update status indicators + Inheritance doesn't work due to optional arguments in UIUpdate proper """ progress: float download_speed: float