From 32d6c207f3c65337994237a841c17a725864562f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathis=20Dr=C3=B6ge?= Date: Sat, 30 Nov 2024 18:38:06 +0100 Subject: [PATCH] Use CDN-provided base URLs with overridden manifest --- legendary/core.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/legendary/core.py b/legendary/core.py index 5e65ef6..18e5cb8 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -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,12 +1355,13 @@ 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 - game.base_urls = base_urls - # save base urls to game metadata - self.lgd.set_game_meta(game.app_name, game) + # overwrite base urls in metadata with current ones to avoid using old/dead CDNs + game.base_urls = base_urls + # save base urls to game metadata + self.lgd.set_game_meta(game.app_name, game) self.log.info('Parsing game manifest...') new_manifest = self.load_manifest(new_manifest_data)