From 21d23baa2016e4619c21c45bd3aa3b14c27c3ac5 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Sun, 19 Feb 2017 20:47:49 -0800 Subject: [PATCH] Don't force interactive mode for EMAIL/PASS if they're already stored --- extras/get-plex-token | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extras/get-plex-token b/extras/get-plex-token index 58c375d..d4a73b8 100755 --- a/extras/get-plex-token +++ b/extras/get-plex-token @@ -5,7 +5,11 @@ URL_LOGIN='https://plex.tv/users/sign_in.json' getPlexToken() { #getPlexServerToken # Check if we're connected to a terminal - if [ -z "$TOKEN" -a -t 0 ]; then + if [ -z "$TOKEN" -a -n "$EMAIL" -a -n "$PASS" ]; then + #TOFIX + echo "WARNING: Storing your email and password has been deprecated. Please re-run extras/installer.sh or see LINK_TO_FAQ." + getPlexWebToken + elif [ -z "$TOKEN" -a -t 0 ]; then echo "To continue, you will need to provide your Plex account credentials." echo "Your email and password will only be used to retrieve a 'token' and will not be saved anywhere." echo