diff --git a/legendary/core.py b/legendary/core.py index 296da30..34defcd 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -733,6 +733,13 @@ class LegendaryCore: self.log.warning(f'Parsing predefined launch parameters failed with: {e!r}, ' f'input: {install.launch_parameters}') + if meta_args := game.additional_command_line: + try: + params.game_parameters.extend(shlex.split(meta_args.strip(), posix=False)) + except ValueError as e: + self.log.warning(f'Parsing metadata launch parameters failed with: {e!r}, ' + f'input: {install.launch_parameters}') + game_token = '' if not offline: self.log.info('Getting authentication token...') diff --git a/legendary/models/game.py b/legendary/models/game.py index 0d615ce..e1f5e30 100644 --- a/legendary/models/game.py +++ b/legendary/models/game.py @@ -91,6 +91,12 @@ class Game: def supports_mac_cloud_saves(self): return self.metadata and (self.metadata.get('customAttributes', {}).get('CloudSaveFolder_MAC') is not None) + @property + def additional_command_line(self): + if not self.metadata: + return None + return self.metadata.get('customAttributes', {}).get('AdditionalCommandLine', {}).get('value', None) + @property def catalog_item_id(self): if not self.metadata: