From 0bc543518cdf3bd8bf1998b9d909641e3fbafcb7 Mon Sep 17 00:00:00 2001 From: derrod Date: Sun, 10 Oct 2021 12:30:25 +0200 Subject: [PATCH] [core] Properly construct Origin launch URI --- legendary/core.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/legendary/core.py b/legendary/core.py index 74fa63b..addc5e6 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -15,7 +15,7 @@ from requests import session from requests.exceptions import HTTPError from typing import List, Dict from uuid import uuid4 -from urllib.parse import urlencode +from urllib.parse import urlencode, parse_qsl from legendary import __version__ from legendary.api.egs import EPCAPI @@ -595,11 +595,13 @@ class LegendaryCore: ('epicusername', user_name), ('epicuserid', account_id), ('epiclocale', self.language_code), - ('theme', 'sws'), - ('platform', 'epic'), - ('Hotfix', 'go') ] + game = self.get_game(app_name) + extra_args = game.metadata.get('customAttributes', {}).get('AdditionalCommandline', {}).get('value') + if extra_args: + parameters.extend(parse_qsl(extra_args)) + return f'link2ea://launchgame/{app_name}?{urlencode(parameters)}' def get_save_games(self, app_name: str = ''):