mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[core] Only fail if absolutely no base-url can be found
Overrides without a known base-url should work.
This commit is contained in:
parent
b89579e3be
commit
33ad64f0a4
|
@ -1145,8 +1145,9 @@ class LegendaryCore:
|
||||||
else:
|
else:
|
||||||
resume_file = None
|
resume_file = None
|
||||||
|
|
||||||
# Match EGS' behaviour and just use the first available URL
|
# Use user-specified base URL or preferred CDN first, otherwise fall back to
|
||||||
base_url = base_urls[0]
|
# EGS's behaviour of just selecting the first CDN in the list.
|
||||||
|
base_url = None
|
||||||
if override_base_url:
|
if override_base_url:
|
||||||
self.log.info(f'Overriding base URL with "{override_base_url}"')
|
self.log.info(f'Overriding base URL with "{override_base_url}"')
|
||||||
base_url = override_base_url
|
base_url = override_base_url
|
||||||
|
@ -1157,6 +1158,11 @@ class LegendaryCore:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.log.warning(f'Preferred CDN "{preferred_cdn}" unavailable, using default selection.')
|
self.log.warning(f'Preferred CDN "{preferred_cdn}" unavailable, using default selection.')
|
||||||
|
# Use first, fail if none known
|
||||||
|
if not base_url:
|
||||||
|
if not base_urls:
|
||||||
|
raise ValueError('No base URLs found, please try again.')
|
||||||
|
base_url = base_urls[0]
|
||||||
|
|
||||||
# The EGS client uses plaintext HTTP by default for the purposes of enabling simple DNS based
|
# 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.
|
# CDN redirection to a (local) cache. In Legendary this will be a config option.
|
||||||
|
|
Loading…
Reference in a new issue