diff --git a/plex-freshen.sh b/plex-freshen.sh index 32b2664..798b7de 100644 --- a/plex-freshen.sh +++ b/plex-freshen.sh @@ -32,10 +32,10 @@ update_from_api() { curl -X PUT http://127.0.0.1:32400/library/clean/bundles?X-Plex-Token=${LOCAL_PLEX_TOKEN} } -case "$1" in +case "$2" in cli) update_from_cli;; ""|api) update_from_api;; - *) echo "'$1' is not a valid plex-tools freshen command";; + *) echo "'$2' is not a valid plex-tools freshen command";; esac diff --git a/plex-sqlite.sh b/plex-sqlite.sh index bf76b1a..22f4fcd 100644 --- a/plex-sqlite.sh +++ b/plex-sqlite.sh @@ -8,7 +8,7 @@ PLEX_SQLITE_RUN() { echo "Getting Host Information" HostConfig - PLEX_SQLITE ${@} + PLEX_SQLITE ${@:2} fi } diff --git a/plex-token.sh b/plex-token.sh index 42edd27..2f09566 100644 --- a/plex-token.sh +++ b/plex-token.sh @@ -55,8 +55,8 @@ token_from_api() { echo $X_PLEX_TOKEN } -case "$1" in +case "$2" in api) token_from_api;; ""|xml) token_from_Pref_XML;; - *) echo "'$1' is not a valid plex-tools token command";; + *) echo "'$2' is not a valid plex-tools token command";; esac diff --git a/plex-tools.sh b/plex-tools.sh index c5dafcb..bd9e3eb 100644 --- a/plex-tools.sh +++ b/plex-tools.sh @@ -3,8 +3,8 @@ echo "Welcome to plex-tools wrapper utility!" case "$1" in - token) source ./plex-token.sh ${@:2};; - freshen) source ./plex-freshen.sh ${@:2};; + token) source ./plex-token.sh;; + freshen) source ./plex-freshen.sh;; claim) source ./claimpms.sh;; sqlite) source ./plex-sqlite.sh;; dbrepair) source ./DBRepair.sh stop auto start exit;;