This commit is contained in:
deathbybandaid 2024-02-22 08:37:29 -05:00
parent c2190f11d3
commit 06d5b324c9
4 changed files with 12 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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
}