mirror of
https://github.com/thorsten-gehrig/alexa-remote-control.git
synced 2024-11-22 08:49:02 +01:00
moved get_devlist after check_status
This commit is contained in:
parent
4036885185
commit
aa34df6f1e
@ -16,6 +16,7 @@
|
||||
# 2017-12-07: v0.7b added Bluetooth connect/disconnect
|
||||
# 2017-12-18: v0.7c fixed US version
|
||||
# 2017-12-19: v0.7d fixed AWK csrf extraction on some systems
|
||||
# 2017-12-20: v0.7e moved get_devlist after check_status
|
||||
#
|
||||
###
|
||||
#
|
||||
@ -618,17 +619,17 @@ if [ ! -f ${COOKIE} ] ; then
|
||||
log_in
|
||||
fi
|
||||
|
||||
if [ ! -f ${DEVLIST} ] ; then
|
||||
echo "device list do not exist. downloading ..."
|
||||
get_devlist
|
||||
fi
|
||||
|
||||
check_status
|
||||
if [ $? -eq 0 ] ; then
|
||||
echo "cookie expired, logging in again ..."
|
||||
log_in
|
||||
fi
|
||||
|
||||
if [ ! -f ${DEVLIST} ] ; then
|
||||
echo "device list do not exist. downloading ..."
|
||||
get_devlist
|
||||
fi
|
||||
|
||||
if [ -n "$COMMAND" -o -n "$QUEUE" ] ; then
|
||||
if [ "${DEVICE}" = "ALL" ] ; then
|
||||
for DEVICE in $(jq -r '.devices[] | select( .deviceFamily == "ECHO" or .deviceFamily == "WHA") | .accountName' ${DEVLIST} | sed -r 's/ /%20/g') ; do
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Amazon Alexa Remote Control (PLAIN shell)
|
||||
# alex(at)loetzimmer.de
|
||||
#
|
||||
# 2017-12-19: v0.7d (for updates see http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html)
|
||||
# 2017-12-20: v0.7de(for updates see http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html)
|
||||
#
|
||||
###
|
||||
#
|
||||
@ -585,17 +585,17 @@ if [ ! -f ${COOKIE} ] ; then
|
||||
log_in
|
||||
fi
|
||||
|
||||
if [ ! -f ${DEVTXT} ] ; then
|
||||
echo "device list do not exist. downloading ..."
|
||||
get_devlist
|
||||
fi
|
||||
|
||||
check_status
|
||||
if [ $? -eq 0 ] ; then
|
||||
echo "cookie expired, logging in again ..."
|
||||
log_in
|
||||
fi
|
||||
|
||||
if [ ! -f ${DEVTXT} ] ; then
|
||||
echo "device list do not exist. downloading ..."
|
||||
get_devlist
|
||||
fi
|
||||
|
||||
if [ -n "$COMMAND" ] ; then
|
||||
set_var
|
||||
if [ -n "$COMMAND" ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user