test
This commit is contained in:
parent
f46deaca24
commit
aa7ce85f26
@ -4,21 +4,22 @@
|
||||
source ./plex-token.sh
|
||||
|
||||
# run a loop against each library
|
||||
for medialibrary in `curl -s -H "Accept: application/json" -H "X-Plex-Token: ${LOCAL_PLEX_TOKEN}" http://127.0.0.1:32400/library/sections`
|
||||
for medialibrary 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[]'`
|
||||
do
|
||||
|
||||
library_number=$($medialibrary | jq -M -r '.MediaContainer.Directory[] | "\(.key)"')
|
||||
library_number=`$medialibrary | "\(.key)"'`
|
||||
library_name=`$medialibrary | "\(.title)"'`
|
||||
echo "$library_name"
|
||||
echo "$library_number"
|
||||
|
||||
#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=${LOCAL_PLEX_TOKEN}
|
||||
#curl -X PUT http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${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=${LOCAL_PLEX_TOKEN}
|
||||
#curl -X PUT http://127.0.0.1:32400/library/sections/${library_number}/emptyTrash\?X-Plex-Token=${TOKEN}
|
||||
|
||||
done
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user