Don't force interactive mode for EMAIL/PASS if they're already stored

This commit is contained in:
Alex Malinovich 2017-02-19 20:47:49 -08:00
commit 21d23baa20

View file

@ -5,7 +5,11 @@ URL_LOGIN='https://plex.tv/users/sign_in.json'
getPlexToken() { getPlexToken() {
#getPlexServerToken #getPlexServerToken
# Check if we're connected to a terminal # 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 "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 "Your email and password will only be used to retrieve a 'token' and will not be saved anywhere."
echo echo