mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[core] Check if game is not-None before updating asset info
This commit is contained in:
parent
c83bf7218c
commit
0fb3d39a0a
|
@ -384,9 +384,15 @@ class LegendaryCore:
|
|||
self.log.info(f'Updating meta for {game.app_name} due to build version mismatch')
|
||||
|
||||
eg_meta = self.egs.get_game_info(ga.namespace, ga.catalog_item_id)
|
||||
game.asset_infos[platform] = ga
|
||||
|
||||
if game:
|
||||
asset_info = game.asset_infos
|
||||
asset_info[platform] = ga
|
||||
else:
|
||||
asset_info = {platform: ga}
|
||||
|
||||
game = Game(app_name=ga.app_name, app_title=eg_meta['title'], metadata=eg_meta,
|
||||
asset_infos=game.asset_infos)
|
||||
asset_infos=asset_info)
|
||||
|
||||
meta_updated = True
|
||||
self.lgd.set_game_meta(game.app_name, game)
|
||||
|
|
Loading…
Reference in a new issue