mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-21 05:43:20 -07:00
use url_login
This commit is contained in:
parent
b9ef530d11
commit
7bc73ce298
1 changed files with 3 additions and 3 deletions
|
@ -184,8 +184,8 @@ fi
|
||||||
#
|
#
|
||||||
# Field Value
|
# Field Value
|
||||||
# user[login] $EMAIL
|
# user[login] $EMAIL
|
||||||
# user[password] $PASSWORD
|
# user[password] $PASS
|
||||||
# authenticity_token <retreived from sign_in.json>
|
# authentication_token <retreived from sign_in.json>
|
||||||
|
|
||||||
# Plex Pass account
|
# Plex Pass account
|
||||||
if [ "${PUBLIC}" == "no" ]; then
|
if [ "${PUBLIC}" == "no" ]; then
|
||||||
|
@ -194,7 +194,7 @@ if [ "${PUBLIC}" == "no" ]; then
|
||||||
AUTH="user%5Blogin%5D=${EMAIL}&user%5Bpassword%5D=${PASS}"
|
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"
|
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
|
# 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
|
if [ $? -ne 0 -o "${TOKEN}" == "" -o "${TOKEN}" == "null" ]; then
|
||||||
echo "Error: Unable to obtain authentication token, page changed?"
|
echo "Error: Unable to obtain authentication token, page changed?"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue