Skip to content

Commit

Permalink
Detect games specifying "the EA app" for their ThirdPartyManagedApp a…
Browse files Browse the repository at this point in the history
…s Origin games
  • Loading branch information
CommandMC committed Dec 30, 2023
1 parent 96e07ff commit 5260bfb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions legendary/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ def list_games(self, args):
# a third-party application (such as Origin).
if not version:
_store = game.third_party_store
if _store == 'Origin':
print(f' - This game has to be activated, installed, and launched via Origin, use '
if _store in ['Origin', 'the EA app']:
print(f' - This game has to be activated, installed, and launched via Origin/the EA app, use '
f'"legendary launch --origin {game.app_name}" to activate and/or run the game.')
elif _store:
print(f' ! This game has to be installed through a third-party store ({_store}, not supported)')
Expand Down Expand Up @@ -722,7 +722,7 @@ def _launch_origin(self, args):
f'to fetch data for Origin titles before using this command.')
return

if not game.third_party_store or game.third_party_store != 'Origin':
if not game.third_party_store or game.third_party_store not in ['Origin', 'the EA app']:
logger.error(f'The specified game is not an Origin title.')
return

Expand Down Expand Up @@ -856,8 +856,8 @@ def install_game(self, args):

if store := game.third_party_store:
logger.error(f'The selected title has to be installed via a third-party store: {store}')
if store == 'Origin':
logger.info(f'For Origin games use "legendary launch --origin {args.app_name}" to '
if store in ['Origin', 'the EA app']:
logger.info(f'For Origin/EA app games use "legendary launch --origin {args.app_name}" to '
f'activate and/or run the game.')
exit(0)

Expand Down Expand Up @@ -2125,7 +2125,7 @@ def read_service_response(response):
logger.info('Redeemed all outstanding Uplay codes.')
elif args.origin:
na_games, _ = self.core.get_non_asset_library_items(skip_ue=True)
origin_games = [game for game in na_games if game.third_party_store == 'Origin']
origin_games = [game for game in na_games if game.third_party_store in ['Origin', 'the EA app']]

if not origin_games:
logger.info('No redeemable games found.')
Expand Down

0 comments on commit 5260bfb

Please sign in to comment.