1
0
Fork 0
mirror of synced 2024-06-22 04:20:25 +12:00

DownloadsTab: Refuse to start download if the game's state is not idle

This commit is contained in:
loathingKernel 2023-01-30 15:03:59 +02:00
parent e7a47a48e1
commit 683b33da10
2 changed files with 4 additions and 3 deletions

View file

@ -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)

View file

@ -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