test
This commit is contained in:
parent
5b6c29cf95
commit
5f4fbe01ad
@ -4,17 +4,17 @@
|
||||
source ./plex-token.sh
|
||||
|
||||
# run a loop against each library
|
||||
for library_number in `curl -s -H "Accept: application/json" -H "X-Plex-Token: ${TOKEN}" http://127.0.0.1:32400/library/sections | jq -M -r '.MediaContainer.Directory[] | "\(.key)"'`
|
||||
for library_number in `curl -s -H "Accept: application/json" -H "X-Plex-Token: ${LOCAL_PLEX_TOKEN}" http://127.0.0.1:32400/library/sections | jq -M -r '.MediaContainer.Directory[] | "\(.key)"'`
|
||||
do
|
||||
|
||||
echo "[DEBUG PLEX] Running Library Update for key: ${library_number}"
|
||||
curl -X PUT http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${TOKEN}
|
||||
curl -X PUT http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
|
||||
# adding 30 sec sleep
|
||||
sleep 30
|
||||
|
||||
echo "[DEBUG PLEX] Emptying Trash for key: ${library_number}"
|
||||
curl -X PUT http://127.0.0.1:32400/library/sections/${library_number}/emptyTrash\?X-Plex-Token=${TOKEN}
|
||||
curl -X PUT http://127.0.0.1:32400/library/sections/${library_number}/emptyTrash\?X-Plex-Token=${LOCAL_PLEX_TOKEN}
|
||||
|
||||
done
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user