From 136ef21a86fd57fd7857caeb5d74e86a6cc70f87 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 11 May 2025 19:37:19 -0700 Subject: [PATCH] Add log message when environment variable not saved to config --- plexpy/config.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plexpy/config.py b/plexpy/config.py index db254886..2c4fa8b4 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -502,10 +502,13 @@ class Config(object): key, definition_type, section, ini_key, default = self._define(name) # Check if the key is in the environment variables env_value = self._from_env(key) - if not env_value: - # If not, set the value in the config file - self._config[section][ini_key] = self._cast_setting(definition_type, value, default) - return self._config[section][ini_key] + if env_value: + logger.warn("Tautulli Config :: '%s' set by environment variable. Setting not saved to config.", key) + return + + # If not, set the value in the config file + self._config[section][ini_key] = self._cast_setting(definition_type, value, default) + return self._config[section][ini_key] def _from_env(self, key): """ Get key from environment variables, if it exists """