mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Fix "info" command for games without asset data (e.g. Origin)
This commit is contained in:
parent
9693a0b8ff
commit
6cef1a1410
|
@ -1343,12 +1343,18 @@ class LegendaryCLI:
|
|||
else:
|
||||
logger.info('Game not installed and offline mode enabled, cannot load manifest.')
|
||||
elif game:
|
||||
# get latest metadata and manifest
|
||||
egl_meta = self.core.egs.get_game_info(game.asset_info.namespace,
|
||||
game.asset_info.catalog_item_id)
|
||||
game.metadata = egl_meta
|
||||
manifest_data, _ = self.core.get_cdn_manifest(game)
|
||||
entitlements = self.core.egs.get_user_entitlements()
|
||||
# get latest metadata and manifest
|
||||
if game.asset_info.catalog_item_id:
|
||||
egl_meta = self.core.egs.get_game_info(game.asset_info.namespace,
|
||||
game.asset_info.catalog_item_id)
|
||||
game.metadata = egl_meta
|
||||
manifest_data, _ = self.core.get_cdn_manifest(game)
|
||||
else:
|
||||
# Origin games do not have asset info, so fall back to info from metadata
|
||||
egl_meta = self.core.egs.get_game_info(game.metadata['namespace'],
|
||||
game.metadata['id'])
|
||||
game.metadata = egl_meta
|
||||
|
||||
if game:
|
||||
game_infos = info_items['game']
|
||||
|
|
Loading…
Reference in a new issue