Fixed the plex client prompt / library name prompts by appending the server-token to the URL.

This commit is contained in:
Justin
2019-01-22 11:01:41 -08:00
parent 9bf2a78d11
commit bd85cfbcc3

View File

@@ -115,7 +115,7 @@ read -p 'Number of Channels: ' number_of_channels
echo "PLEX AUTH TOKEN is $server_token"
echo "SELECT the PLEX CLIENT for this install or ENTER one manually"
# DISPLAY A LIST OF CONNECTED CLIENTS AND ALLOW THE USER TO SELECT ONE OR ENTER ONE THAT ISN'T DISPLAYED
clientlist=$(xmllint --xpath "//Server/@name" "http://$server_ip:$server_port/clients" | sed "s|name=||g" | sed "s|^ ||g" && echo -e " Other")
clientlist=$(xmllint --xpath "//Server/@name" "http://$server_ip:$server_port/clients/?X-Plex-Token=$server_token" | sed "s|name=||g" | sed "s|^ ||g" && echo -e " Other")
eval set $clientlist
select ps_client_entry in "$@"
do
@@ -137,7 +137,7 @@ read -p 'Number of Channels: ' number_of_channels
do
#read -p 'TV Show Library Name: ' tv_library_entry
#echo -n "\"$tv_library_entry\"" >> tv-libraries.temp
library_list_tv=$(xmllint --xpath "//Directory[@type=\"show\"]/@title" "http://$server_ip:$server_port/library/sections" | sed "s|title=||g" | sed "s|^ ||g" && echo -e " Other")
library_list_tv=$(xmllint --xpath "//Directory[@type=\"show\"]/@title" "http://$server_ip:$server_port/library/sections/?X-Plex-Token=$server_token" | sed "s|title=||g" | sed "s|^ ||g" && echo -e " Other")
eval set $library_list_tv
select tv_library_entry in "$@"
do
@@ -169,7 +169,7 @@ read -p 'Number of Channels: ' number_of_channels
do
#read -p 'Movie Library Name: ' movie_library_entry
#echo -n "\"$movie_library_entry\"" >> movie-libraries.temp
library_list_movie=$(xmllint --xpath "//Directory[@type=\"movie\"]/@title" "http://$server_ip:$server_port/library/sections" | sed "s|title=||g" | sed "s|^ ||g" && echo -e " Other")
library_list_movie=$(xmllint --xpath "//Directory[@type=\"movie\"]/@title" "http://$server_ip:$server_port/library/sections/?X-Plex-Token=$server_token" | sed "s|title=||g" | sed "s|^ ||g" && echo -e " Other")
eval set $library_list_movie
select movie_library_entry in "$@"
do
@@ -212,7 +212,7 @@ read -p 'Number of Channels: ' number_of_channels
while [[ "$enter_commercials" == @(Y|y|Yes|yes|YES) ]]
do
#read -p 'Commercial Library Name: ' commercial_library_entry
library_list_commercial=$(xmllint --xpath "//Directory[@type=\"movie\"]/@title" "http://$server_ip:$server_port/library/sections" | sed "s|title=||g" | sed "s|^ ||g" && echo -e " Other")
library_list_commercial=$(xmllint --xpath "//Directory[@type=\"movie\"]/@title" "http://$server_ip:$server_port/library/sections/?X-Plex-Token=$server_token" | sed "s|title=||g" | sed "s|^ ||g" && echo -e " Other")
eval set $library_list_commercial
select commercial_library_entry in "$@"
do