From 6cef1a14103a2c56528ff24764fbaf8634f83db8 Mon Sep 17 00:00:00 2001 From: derrod Date: Sun, 10 Oct 2021 12:36:38 +0200 Subject: [PATCH] [cli] Fix "info" command for games without asset data (e.g. Origin) --- legendary/cli.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/legendary/cli.py b/legendary/cli.py index e24832a..f793c97 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -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']