Detect games specifying "the EA app" for their ThirdPartyManagedApp as Origin games

This commit is contained in:
Mathis Dröge 2023-12-30 16:32:13 +01:00
parent 96e07ff453
commit 5260bfb5e5
No known key found for this signature in database
GPG key ID: 41013BA02BFD76C5

View file

@ -242,8 +242,8 @@ class LegendaryCLI:
# 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)')
@ -722,7 +722,7 @@ class LegendaryCLI:
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
@ -856,8 +856,8 @@ class LegendaryCLI:
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)
@ -2125,7 +2125,7 @@ class LegendaryCLI:
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.')