Skip to content

Commit

Permalink
[core] Normalise OwnershipToken value to lowercase
Browse files Browse the repository at this point in the history
Apparently this can be uppercase or lowercase, thanks Epic!
  • Loading branch information
imLinguin authored and derrod committed Aug 23, 2024
1 parent 08c64eb commit f1f5cc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions legendary/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ def prepare_download(self, game: Game, base_game: Game = None, base_path: str =
args=new_manifest.meta.uninstall_action_args)

offline = game.metadata.get('customAttributes', {}).get('CanRunOffline', {}).get('value', 'true')
ot = game.metadata.get('customAttributes', {}).get('OwnershipToken', {}).get('value', 'false')
ot = game.metadata.get('customAttributes', {}).get('OwnershipToken', {}).get('value', 'false').lower()

if file_install_tag is None:
file_install_tag = []
Expand Down Expand Up @@ -1761,7 +1761,7 @@ def import_game(self, game: Game, app_path: str, egl_guid='', platform='Windows'
path=new_manifest.meta.prereq_path, args=new_manifest.meta.prereq_args)

offline = game.metadata.get('customAttributes', {}).get('CanRunOffline', {}).get('value', 'true')
ot = game.metadata.get('customAttributes', {}).get('OwnershipToken', {}).get('value', 'false')
ot = game.metadata.get('customAttributes', {}).get('OwnershipToken', {}).get('value', 'false').lower()
igame = InstalledGame(app_name=game.app_name, title=game.app_title, prereq_info=prereq, base_urls=base_urls,
install_path=app_path, version=new_manifest.meta.build_version, is_dlc=game.is_dlc,
executable=new_manifest.meta.launch_exe, can_run_offline=offline == 'true',
Expand Down

0 comments on commit f1f5cc0

Please sign in to comment.