DownloadsTab: Use is_idle
This commit is contained in:
parent
6800b7e9ab
commit
38710a0af1
1 changed files with 3 additions and 2 deletions
|
@ -164,9 +164,10 @@ class DownloadsTab(QWidget):
|
||||||
|
|
||||||
def __start_download(self, item: InstallQueueItemModel):
|
def __start_download(self, item: InstallQueueItemModel):
|
||||||
rgame = self.rcore.get_game(item.options.app_name)
|
rgame = self.rcore.get_game(item.options.app_name)
|
||||||
if rgame.state != RareGame.State.IDLE:
|
if not rgame.is_idle:
|
||||||
logger.error(f"Can't start download {item.options.app_name} due to non-idle state {rgame.state}")
|
logger.error(f"Can't start download {item.options.app_name} due to non-idle state {rgame.state}")
|
||||||
self.__requeue_download(item)
|
# lk: invalidate the queue item in case the game was uninstalled
|
||||||
|
self.__requeue_download(InstallQueueItemModel(options=item.options))
|
||||||
return
|
return
|
||||||
if item.expired:
|
if item.expired:
|
||||||
self.__refresh_download(item)
|
self.__refresh_download(item)
|
||||||
|
|
Loading…
Reference in a new issue