mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[cli/core] Ensure update checks use the right platform(s)
This commit is contained in:
parent
f280d53496
commit
e8207d53cd
|
@ -255,7 +255,9 @@ class LegendaryCLI:
|
|||
if not self.core.login():
|
||||
logger.error('Login failed! Not checking for updates.')
|
||||
else:
|
||||
self.core.get_assets(True)
|
||||
# Update assets for all platforms currently installed
|
||||
for platform in self.core.get_installed_platforms():
|
||||
self.core.get_assets(True, platform=platform)
|
||||
|
||||
games = sorted(self.core.get_installed_list(include_dlc=True),
|
||||
key=lambda x: x.title.lower())
|
||||
|
@ -559,7 +561,7 @@ class LegendaryCLI:
|
|||
if not args.skip_version_check and not self.core.is_noupdate_game(app_name):
|
||||
logger.info('Checking for updates...')
|
||||
try:
|
||||
latest = self.core.get_asset(app_name, update=True)
|
||||
latest = self.core.get_asset(app_name, update=True, platform=igame.platform)
|
||||
except ValueError:
|
||||
logger.fatal(f'Metadata for "{app_name}" does not exist, cannot launch!')
|
||||
exit(1)
|
||||
|
|
|
@ -467,6 +467,9 @@ class LegendaryCore:
|
|||
_, dlcs = self.get_game_and_dlc_list(update_assets=False, platform=platform)
|
||||
return dlcs[game.asset_infos['Windows'].catalog_item_id]
|
||||
|
||||
def get_installed_platforms(self):
|
||||
return {i.platform for i in self._get_installed_list(False)}
|
||||
|
||||
def get_installed_list(self, include_dlc=False) -> List[InstalledGame]:
|
||||
if self.egl_sync_enabled:
|
||||
self.log.debug('Running EGL sync...')
|
||||
|
|
Loading…
Reference in a new issue