From b67a489c79887f4c5b8285db1121fd510d81b8ff Mon Sep 17 00:00:00 2001 From: TBK <858296+TBK@users.noreply.github.com> Date: Wed, 31 Oct 2018 22:42:43 +0100 Subject: [PATCH 1/2] Update to PMS version 1.13.9.5456 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d85fb7..ba501a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -ARG PLEX_VER=1.13.8.5395-10d48da0d -ARG PLEX_SHA=4efd35c9d3308b072e6daa8096f2a57bc3c67d42 +ARG PLEX_VER=1.13.9.5456-ecd600442 +ARG PLEX_SHA=98e0c2dbd688910c78d0f39b5e5433ac67bbcd44 ARG LIBSTDCPP_VER=6.3.0-18+deb9u1 ARG LIBGCC1_VER=6.3.0-18+deb9u1 ARG XMLSTAR_VER=1.6.1 From f9e4de3149fc34dabcfe202ff722ac20fbd00b0a Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 26 Nov 2018 15:30:45 +0200 Subject: [PATCH 2/2] Added log environment variables (#6) * Added verbose env variables - `LOG_DEBUG` or `LOG_VERBOSE` do not change anything it they are unset (same as before) - `LOG_DEBUG` or `LOG_VERBOSE` take precedence on Plex configuration file at start when set to `0` or `1`. The user can change the Preferences once the container is started which will overwrite the environment variables. --- README.md | 2 ++ entrypoint | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/README.md b/README.md index 8d56b26..0a6ffe4 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ Finally, navigate to [app.plex.tv/desktop](https://app.plex.tv/desktop) or [your - `$ADVERTISE_IP` - This variable defines the additional IPs on which the server may be be found. For example: `http://10.1.1.23:32400`. This adds to the list where the server advertises that it can be found. - `$DISABLE_REMOTE_SEC` - - `$PLEX_CLAIM` - The claim token for the server to obtain a real server token. If not provided, server will not be automatically logged in. If server is already logged in, this parameter is ignored. +- `$LOG_DEBUG` - Disables debug logging if set to 0, and enables it if set to 1. This overwrites preferences set in the Plex Web user interface. +- `$LOG_VERBOSE` - Disables logging (except warnings and errors) if set to 0, and enables it if set to 1. This overwrites preferences set in the Plex Web user interface. ### Network diff --git a/entrypoint b/entrypoint index 8b9ae67..80455d2 100755 --- a/entrypoint +++ b/entrypoint @@ -51,6 +51,26 @@ if [ ! -e "\$PREF_FILE" ]; then source gen-config.sh fi +# Changes the log verbosity (Environment variable takes precedence on Plex Config) +if [ "$LOG_VERBOSE" = "1" ]; then + setPref "LogVerbose" "1" +elif [ "$LOG_VERBOSE" = "0" ]; then + setPref "LogVerbose" "0" +elif [ ! -z "$LOG_VERBOSE" ]; then + 2>&1 echo -e "${RED}LOG_VERBOSE value '$LOG_VERBOSE' is invalid${RESET}" + exit 1 +fi + +# Changes the debug verbosity (Environment variable takes precedence on Plex Config) +if [ "$LOG_DEBUG" = "1" ]; then + setPref "logDebug" "1" +elif [ "$LOG_DEBUG" = "0" ]; then + setPref "logDebug" "0" +elif [ ! -z "$LOG_DEBUG" ]; then + 2>&1 echo -e "${RED}LOG_DEBUG value '$LOG_DEBUG' is invalid${RESET}" + exit 1 +fi + # Always attempt to claim an unclaimed server in case it was signed out token="\$(getPref "PlexOnlineToken")" if [ ! -z "\${PLEX_CLAIM}" ] && [ -z "\${token}" ]; then