🚧 More work on managers

This commit is contained in:
GeoffreyCoulaud
2023-05-23 02:31:00 +02:00
parent 3df9380c2d
commit 9ea2e9652d
8 changed files with 57 additions and 13 deletions

View File

@@ -118,23 +118,13 @@ class Importer:
if game is None:
continue
# TODO register in store instead of dict
# Avoid duplicates
if (
game.game_id in shared.win.games
and not shared.win.games[game.game_id].removed
):
continue
# Register game
logging.info("New game registered %s (%s)", game.name, game.game_id)
shared.win.games[game.game_id] = game
game.save()
logging.info("Imported %s (%s)", game.name, game.game_id)
shared.store.add_game(game)
self.n_games_added += 1
# Start sgdb lookup for game
# HACK move to its own manager
# TODO move to its own manager
task = Task.new(
None, self.sgdb_cancellable, self.sgdb_task_callback, (game,)
)