test
This commit is contained in:
parent
c2190f11d3
commit
06d5b324c9
@ -23,7 +23,8 @@ update_from_api() {
|
|||||||
do
|
do
|
||||||
|
|
||||||
echo "Analyzing for key: ${library_number}"
|
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
|
done
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,8 @@ update_from_api() {
|
|||||||
# get plex token
|
# get plex token
|
||||||
source ./plex-token.sh
|
source ./plex-token.sh
|
||||||
echo "Cleaning Bundles"
|
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
|
case "$2" in
|
||||||
|
|||||||
@ -23,15 +23,18 @@ update_from_api() {
|
|||||||
do
|
do
|
||||||
|
|
||||||
echo "Running Library Update and metadata refresh for key: ${library_number}"
|
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}"
|
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
|
done
|
||||||
|
|
||||||
echo "Cleaning Bundles"
|
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
|
for library_number in $LOCAL_LIBRARY_IDS
|
||||||
do
|
do
|
||||||
echo "Running Library Update and metadata refresh for key: ${library_number}"
|
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
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user