From c83bf7218ce1764b039a5f9839bdda5c6fa8ccee Mon Sep 17 00:00:00 2001 From: derrod Date: Wed, 1 Dec 2021 21:30:41 +0100 Subject: [PATCH] [core] Remove remaining hardcoded platform strings --- legendary/core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/legendary/core.py b/legendary/core.py index 7e042cb..69510f5 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -467,7 +467,7 @@ class LegendaryCore: return [] _, dlcs = self.get_game_and_dlc_list(update_assets=False, platform=platform) - return dlcs[game.asset_infos['Windows'].catalog_item_id] + return dlcs[game.asset_infos[platform].catalog_item_id] def get_installed_platforms(self): return {i.platform for i in self._get_installed_list(False)} @@ -596,11 +596,11 @@ class LegendaryCore: if install.requires_ot and not offline: self.log.info('Getting ownership token.') - ovt = self.egs.get_ownership_token(game.asset_infos['Windows'].namespace, - game.asset_infos['Windows'].catalog_item_id) + ovt = self.egs.get_ownership_token(game.asset_infos[install.platform].namespace, + game.asset_infos[install.platform].catalog_item_id) ovt_path = os.path.join(self.lgd.get_tmp_path(), - f'{game.asset_infos["Windows"].namespace}' - f'{game.asset_infos["Windows"].catalog_item_id}.ovt') + f'{game.asset_infos[install.platform].namespace}' + f'{game.asset_infos[install.platform].catalog_item_id}.ovt') with open(ovt_path, 'wb') as f: f.write(ovt) params.egl_parameters.append(f'-epicovt={ovt_path}')