[core/cli] Fix typos in function names

This commit is contained in:
derrod 2020-06-05 15:01:02 +02:00
parent 8d46d7ad2e
commit 4720b59d99
2 changed files with 14 additions and 14 deletions

View file

@ -192,7 +192,7 @@ class LegendaryCLI:
for game in games:
if game.install_size == 0:
logger.debug(f'Updating missing size for {game.app_name}')
m = self.core.load_manfiest(self.core.get_installed_manifest(game.app_name)[0])
m = self.core.load_manifest(self.core.get_installed_manifest(game.app_name)[0])
game.install_size = sum(fm.file_size for fm in m.file_manifest_list.elements)
self.core.install_game(game)
@ -218,7 +218,7 @@ class LegendaryCLI:
# check if we even need to log in
if args.override_manifest:
logger.info(f'Loading manifest from "{args.override_manifest}"')
manifest_data, _ = self.core.get_uri_manfiest(args.override_manifest)
manifest_data, _ = self.core.get_uri_manifest(args.override_manifest)
elif self.core.is_installed(args.app_name) and not args.force_download:
logger.info(f'Loading installed manifest for "{args.app_name}"')
manifest_data, _ = self.core.get_installed_manifest(args.app_name)
@ -230,7 +230,7 @@ class LegendaryCLI:
game = self.core.get_game(args.app_name, update_meta=True)
manifest_data, _ = self.core.get_cdn_manifest(game, platform_override=args.platform_override)
manifest = self.core.load_manfiest(manifest_data)
manifest = self.core.load_manifest(manifest_data)
files = sorted(manifest.file_manifest_list.elements,
key=lambda a: a.filename.lower())
@ -720,7 +720,7 @@ class LegendaryCLI:
logger.info(f'Loading installed manifest for "{args.app_name}"')
igame = self.core.get_installed_game(args.app_name)
manifest_data, _ = self.core.get_installed_manifest(args.app_name)
manifest = self.core.load_manfiest(manifest_data)
manifest = self.core.load_manifest(manifest_data)
files = sorted(manifest.file_manifest_list.elements,
key=lambda a: a.filename.lower())

View file

@ -513,7 +513,7 @@ class LegendaryCore:
if r.status_code != 200:
self.log.error(f'Download failed, status code: {r.status_code}')
continue
m = self.load_manfiest(r.content)
m = self.load_manifest(r.content)
# download chunks required for extraction
chunks = dict()
@ -579,7 +579,7 @@ class LegendaryCore:
return meta.is_dlc
@staticmethod
def load_manfiest(data: bytes) -> Manifest:
def load_manifest(data: bytes) -> Manifest:
if data[0:1] == b'{':
return JSONManifest.read_all(data)
else:
@ -623,7 +623,7 @@ class LegendaryCore:
r.raise_for_status()
return r.content, base_urls
def get_uri_manfiest(self, uri):
def get_uri_manifest(self, uri):
if uri.startswith('http'):
r = self.egs.unauth_session.get(uri)
r.raise_for_status()
@ -652,8 +652,8 @@ class LegendaryCore:
# load old manifest if we have one
if override_old_manifest:
self.log.info(f'Overriding old manifest with "{override_old_manifest}"')
old_bytes, _ = self.get_uri_manfiest(override_old_manifest)
old_manifest = self.load_manfiest(old_bytes)
old_bytes, _ = self.get_uri_manifest(override_old_manifest)
old_manifest = self.load_manifest(old_bytes)
elif not disable_patching and not force and self.is_installed(game.app_name):
old_bytes, _base_urls = self.get_installed_manifest(game.app_name)
if _base_urls and not game.base_urls:
@ -662,13 +662,13 @@ class LegendaryCore:
if not old_bytes:
self.log.error(f'Could not load old manifest, patching will not work!')
else:
old_manifest = self.load_manfiest(old_bytes)
old_manifest = self.load_manifest(old_bytes)
base_urls = list(game.base_urls) # copy list for manipulation
if override_manifest:
self.log.info(f'Overriding manifest with "{override_manifest}"')
new_manifest_data, _base_urls = self.get_uri_manfiest(override_manifest)
new_manifest_data, _base_urls = self.get_uri_manifest(override_manifest)
# if override manifest has a base URL use that instead
if _base_urls:
base_urls = _base_urls
@ -680,7 +680,7 @@ class LegendaryCore:
self.lgd.set_game_meta(game.app_name, game)
self.log.info('Parsing game manifest...')
new_manifest = self.load_manfiest(new_manifest_data)
new_manifest = self.load_manifest(new_manifest_data)
self.log.debug(f'Base urls: {base_urls}')
self.lgd.save_manifest(game.app_name, new_manifest_data)
# save manifest with version name as well for testing/downgrading/etc.
@ -889,7 +889,7 @@ class LegendaryCore:
base_urls = game.base_urls
# parse and save manifest to disk for verification step of import
new_manifest = self.load_manfiest(manifest_data)
new_manifest = self.load_manifest(manifest_data)
self.lgd.save_manifest(game.app_name, manifest_data)
self.lgd.save_manifest(game.app_name, manifest_data,
version=new_manifest.meta.build_version)
@ -955,7 +955,7 @@ class LegendaryCore:
# load manifest file and copy it over
with open(manifest_filename, 'rb') as f:
manifest_data = f.read()
new_manifest = self.load_manfiest(manifest_data)
new_manifest = self.load_manifest(manifest_data)
self.lgd.save_manifest(lgd_igame.app_name, manifest_data)
self.lgd.save_manifest(lgd_igame.app_name, manifest_data,
version=new_manifest.meta.build_version)