Use CDN-provided base URLs with overridden manifest

This commit is contained in:
Mathis Dröge 2024-11-30 18:38:06 +01:00
parent 1ccbffe1ad
commit 32d6c207f3
No known key found for this signature in database
GPG key ID: 3071D4EFBB298F5F

View file

@ -1348,8 +1348,6 @@ class LegendaryCore:
else:
old_manifest = self.load_manifest(old_bytes)
base_urls = game.base_urls
# The EGS client uses plaintext HTTP by default for the purposes of enabling simple DNS based
# CDN redirection to a (local) cache. In Legendary this will be a config option.
disable_https = disable_https or self.lgd.config.getboolean('Legendary', 'disable_https', fallback=False)
@ -1357,6 +1355,7 @@ class LegendaryCore:
if override_manifest:
self.log.info(f'Overriding manifest with "{override_manifest}"')
new_manifest_data = self.get_uri_manifest(override_manifest)
_, base_urls, _ = self.get_cdn_urls(game, platform)
else:
new_manifest_data, base_urls = self.get_cdn_manifest(game, platform, disable_https=disable_https)
# overwrite base urls in metadata with current ones to avoid using old/dead CDNs