Exemple #1
0
 def match_existing_game(self, db_games, appid):
     """Checks if a game is already installed and populates the service info"""
     for _game in db_games:
         logger.info("Found existing installation of %s (%s)", _game["name"], _game["installed"])
         game = Game(_game["id"])
         game.appid = appid
         game.service = self.id
         game.save()
         return game
Exemple #2
0
 def match_existing_game(self, db_games, appid):
     """Checks if a game is already installed and populates the service info"""
     for _game in db_games:
         logger.debug("Matching %s with existing install: %s", appid, _game)
         game = Game(_game["id"])
         game.appid = appid
         game.service = self.id
         game.save()
         service_game = ServiceGameCollection.get_game(self.id, appid)
         sql.db_update(PGA_DB, "service_games", {"lutris_slug": game["slug"]}, {"id": service_game["id"]})
         return game