DownloadsTab: Refuse to start download if the game's state is not idle
This commit is contained in:
parent
e7a47a48e1
commit
683b33da10
|
@ -66,9 +66,6 @@ class TabWidget(QTabWidget):
|
|||
self.settings_tab.about.update_available_ready.connect(
|
||||
lambda: self.tabBar().setTabText(5, "(!)")
|
||||
)
|
||||
# Signals
|
||||
# set current index
|
||||
# self.signals.set_main_tab_index.connect(self.setCurrentIndex)
|
||||
|
||||
# Open game list on click on Games tab button
|
||||
self.tabBarClicked.connect(self.mouse_clicked)
|
||||
|
|
|
@ -163,6 +163,10 @@ class DownloadsTab(QWidget):
|
|||
self.threadpool.start(worker)
|
||||
|
||||
def __start_download(self, item: InstallQueueItemModel):
|
||||
rgame = self.rcore.get_game(item.options.app_name)
|
||||
if rgame.state != RareGame.State.IDLE:
|
||||
self.__requeue_download(item)
|
||||
return
|
||||
if item.expired:
|
||||
self.__refresh_download(item)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue