test
This commit is contained in:
parent
c2190f11d3
commit
06d5b324c9
@ -23,7 +23,8 @@ update_from_api() {
|
||||
do
|
||||
|
||||
echo "Analyzing for key: ${library_number}"
|
||||
curl -X GET http://127.0.0.1:32400/library/sections/${library_number}/analyze\?X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
plex_api_url="http://127.0.0.1:32400/library/sections/${library_number}/analyze\?X-Plex-Token=${LOCAL_PLEX_TOKEN}"
|
||||
curl -X GET $plex_api_url
|
||||
|
||||
done
|
||||
|
||||
|
||||
@ -17,7 +17,8 @@ update_from_api() {
|
||||
# get plex token
|
||||
source ./plex-token.sh
|
||||
echo "Cleaning Bundles"
|
||||
curl -X PUT http://127.0.0.1:32400/library/clean/bundles?X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
plex_api_url="http://127.0.0.1:32400/library/clean/bundles?X-Plex-Token=${LOCAL_PLEX_TOKEN}"
|
||||
curl -X GET $plex_api_url
|
||||
}
|
||||
|
||||
case "$2" in
|
||||
|
||||
@ -23,15 +23,18 @@ update_from_api() {
|
||||
do
|
||||
|
||||
echo "Running Library Update and metadata refresh for key: ${library_number}"
|
||||
curl -X GET http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
plex_api_url="http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${LOCAL_PLEX_TOKEN}"
|
||||
curl -X GET $plex_api_url
|
||||
|
||||
echo "Emptying Trash for key: ${library_number}"
|
||||
curl -X GET http://127.0.0.1:32400/library/sections/${library_number}/emptyTrash\?X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
plex_api_url="http://127.0.0.1:32400/library/sections/${library_number}/emptyTrash\?X-Plex-Token=${LOCAL_PLEX_TOKEN}"
|
||||
curl -X GET $plex_api_url
|
||||
|
||||
done
|
||||
|
||||
echo "Cleaning Bundles"
|
||||
curl -X GET http://127.0.0.1:32400/library/clean/bundles?X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
plex_api_url="http://127.0.0.1:32400/library/clean/bundles?X-Plex-Token=${LOCAL_PLEX_TOKEN}"
|
||||
curl -X GET $plex_api_url
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,8 @@ update_from_api() {
|
||||
for library_number in $LOCAL_LIBRARY_IDS
|
||||
do
|
||||
echo "Running Library Update and metadata refresh for key: ${library_number}"
|
||||
curl -X GET http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
plex_api_url="http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${LOCAL_PLEX_TOKEN}"
|
||||
curl -X GET $plex_api_url
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user