Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CtInfo: Update Games List after Batch Update #350

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pupgui2/pupgui2ctinfodialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def update_game_list(self, cached=True):
self.ui.listGames.setEnabled(False)

self.update_game_list_ui()
self.batch_update_complete.emit(True)

def update_game_list_steam(self, cached=True):
if self.install_loc.get('launcher') == 'steam' and 'vdf_dir' in self.install_loc:
Expand All @@ -90,8 +91,6 @@ def update_game_list_steam(self, cached=True):
self.ui.listGames.setItem(i, 0, dataitem_appid)
self.ui.listGames.setItem(i, 1, QTableWidgetItem(game.game_name))

self.batch_update_complete.emit(True)

def update_game_list_lutris(self):
self.games = [game for game in get_lutris_game_list(self.install_loc) if game.runner == 'wine' and game.get_game_config().get('wine', {}).get('version') == self.ctool.displayname]

Expand Down Expand Up @@ -137,7 +136,7 @@ def list_games_cell_double_clicked(self, row):
def btn_batch_update_clicked(self):
steam_config_folder = self.install_loc.get('vdf_dir')
ctbu_dialog = PupguiCtBatchUpdateDialog(parent=self.ui, current_ctool_name=self.ctool.displayname, games=self.games, steam_config_folder=steam_config_folder)
ctbu_dialog.batch_update_complete.connect(self.update_game_list_steam)
ctbu_dialog.batch_update_complete.connect(self.btn_refresh_games_clicked)

def btn_refresh_games_clicked(self):
self.update_game_list(cached=False)
Expand Down