Added PLEX_CLAIM_FILE env

This commit is contained in:
mxMeeple 2023-02-09 20:10:04 +00:00 committed by GitHub
parent 94725e4785
commit 2677bb69e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,9 @@ fi
# Get server token and only turn claim token into server token if we have former but not latter. # Get server token and only turn claim token into server token if we have former but not latter.
token="$(getPref "PlexOnlineToken")" token="$(getPref "PlexOnlineToken")"
if [ -z "${PLEX_CLAIM}" ] && [ -f "${PLEX_CLAIM_FILE}" ]; then
PLEX_CLAIM=$(cat ${PLEX_CLAIM_FILE})
fi
if [ ! -z "${PLEX_CLAIM}" ] && [ -z "${token}" ]; then if [ ! -z "${PLEX_CLAIM}" ] && [ -z "${token}" ]; then
echo "Attempting to obtain server token from claim token" echo "Attempting to obtain server token from claim token"
loginInfo="$(curl -X POST \ loginInfo="$(curl -X POST \