From 9fdf768ce3f5fa47a58b821fd0c7db993f480018 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 8 Dec 2022 11:02:39 +0000 Subject: [PATCH] CAPI: Enable selection of SERVER_LEGACY in `capi_host_for_galaxy()` Also adds DEBUG logging for the selection. --- companion.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/companion.py b/companion.py index 4aff101a..d4874fe0 100644 --- a/companion.py +++ b/companion.py @@ -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 '' ######################################################################