1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

CAPI: Enable selection of SERVER_LEGACY in capi_host_for_galaxy()

Also adds DEBUG logging for the selection.
This commit is contained in:
Athanasius 2022-12-08 11:02:39 +00:00
parent 0523e2289a
commit 9fdf768ce3
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -1080,17 +1080,22 @@ class Session(object):
"""
if self.credentials is None:
# Can't tell if beta or not
logger.warning("Dropping CAPI request because unclear if game beta or not")
return ''
if self.credentials['beta']:
logger.debug(f"Using {SERVER_BETA} because {self.credentials['beta']=}")
return SERVER_BETA
if monitor.is_live_galaxy():
logger.debug(f"Using {SERVER_LIVE} because monitor.is_live_galaxy() was True")
return SERVER_LIVE
# return SERVER_LEGACY # Not Yet
logger.warning("Dropping CAPI request because this is the Legacy galaxy, which is not yet supported")
return ""
else:
logger.debug(f"Using {SERVER_LEGACY} because monitor.is_live_galaxy() was False")
return SERVER_LEGACY
return ''
######################################################################