Backport new game fix - closes #143

This commit is contained in:
kramo
2023-07-09 09:59:03 +02:00
parent a0c46bbc74
commit b4bfe38765

View File

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