mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[core] Remove remaining hardcoded platform strings
This commit is contained in:
parent
24832ea074
commit
c83bf7218c
|
@ -467,7 +467,7 @@ class LegendaryCore:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
_, dlcs = self.get_game_and_dlc_list(update_assets=False, platform=platform)
|
_, 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):
|
def get_installed_platforms(self):
|
||||||
return {i.platform for i in self._get_installed_list(False)}
|
return {i.platform for i in self._get_installed_list(False)}
|
||||||
|
@ -596,11 +596,11 @@ class LegendaryCore:
|
||||||
|
|
||||||
if install.requires_ot and not offline:
|
if install.requires_ot and not offline:
|
||||||
self.log.info('Getting ownership token.')
|
self.log.info('Getting ownership token.')
|
||||||
ovt = self.egs.get_ownership_token(game.asset_infos['Windows'].namespace,
|
ovt = self.egs.get_ownership_token(game.asset_infos[install.platform].namespace,
|
||||||
game.asset_infos['Windows'].catalog_item_id)
|
game.asset_infos[install.platform].catalog_item_id)
|
||||||
ovt_path = os.path.join(self.lgd.get_tmp_path(),
|
ovt_path = os.path.join(self.lgd.get_tmp_path(),
|
||||||
f'{game.asset_infos["Windows"].namespace}'
|
f'{game.asset_infos[install.platform].namespace}'
|
||||||
f'{game.asset_infos["Windows"].catalog_item_id}.ovt')
|
f'{game.asset_infos[install.platform].catalog_item_id}.ovt')
|
||||||
with open(ovt_path, 'wb') as f:
|
with open(ovt_path, 'wb') as f:
|
||||||
f.write(ovt)
|
f.write(ovt)
|
||||||
params.egl_parameters.append(f'-epicovt={ovt_path}')
|
params.egl_parameters.append(f'-epicovt={ovt_path}')
|
||||||
|
|
Loading…
Reference in a new issue