From b4bfe38765746c04d8f2467bf26ef7e85d1da78f Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Sun, 9 Jul 2023 09:59:03 +0200 Subject: [PATCH] Backport new game fix - closes #143 --- src/details_window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/details_window.py b/src/details_window.py index addebf3..33553fa 100644 --- a/src/details_window.py +++ b/src/details_window.py @@ -158,11 +158,12 @@ class DetailsWindow(Adw.Window): source_id = "imported" numbers = [0] game_id: str - for game_id in shared.source_games[source_id]: + for game_id in shared.store.source_games.get(source_id, set()): prefix = "imported_" if not game_id.startswith(prefix): continue numbers.append(int(game_id.replace(prefix, "", 1))) + game_number = max(numbers) + 1 self.game = Game(