From e927adbf618f1f0b12ba11a5db29a3b8f0737a6a Mon Sep 17 00:00:00 2001 From: Paul Roche Date: Fri, 18 Mar 2016 21:48:53 -0700 Subject: [PATCH] use url_login --- plexupdate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index 74e41ac..f16cf1e 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -183,8 +183,8 @@ fi # # Field Value # user[login] $EMAIL -# user[password] $PASSWORD -# authenticity_token +# user[password] $PASS +# authentication_token # Plex Pass account if [ "${PUBLIC}" == "no" ]; then @@ -193,7 +193,7 @@ if [ "${PUBLIC}" == "no" ]; then AUTH="user%5Blogin%5D=${EMAIL}&user%5Bpassword%5D=${PASS}" CURL_OPTS="-s -H X-Plex-Client-Identifier:plexupdate -H X-Plex-Product:plexupdate -H X-Plex-Version:0.0.1" # Authenticate and get X-Plex-Token - TOKEN=$(curl ${CURL_OPTS} --data "${AUTH}" 'https://plex.tv/users/sign_in.json' | jq -r .user.authentication_token) + TOKEN=$(curl ${CURL_OPTS} --data "${AUTH}" "${URL_LOGIN}" | jq -r .user.authentication_token) if [ $? -ne 0 -o "${TOKEN}" == "" -o "${TOKEN}" == "null" ]; then echo "Error: Unable to obtain authentication token, page changed?" exit 1