test
This commit is contained in:
parent
29dc0e1aa2
commit
0d4c89ccf2
@ -22,9 +22,13 @@ update_from_api() {
|
|||||||
# run a loop against each library
|
# run a loop against each library
|
||||||
for library_number in $LOCAL_LIBRARY_IDS
|
for library_number in $LOCAL_LIBRARY_IDS
|
||||||
do
|
do
|
||||||
|
plex_api_url="http://127.0.0.1:32400/library/sections/${library_number}?X-Plex-Token=${LOCAL_PLEX_TOKEN}"
|
||||||
|
library_title=`curl -s -H "Accept: application/json" -H "X-Plex-Token: ${LOCAL_PLEX_TOKEN}" $plex_api_url | jq -M -r '.MediaContainer.Directory[] | "\(.title)"'`
|
||||||
|
echo $library_title
|
||||||
|
|
||||||
echo "Running Library Update and metadata refresh for key: ${library_number}"
|
echo "Running Library Update and metadata refresh for key: ${library_number}"
|
||||||
plex_api_url="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
|
#curl -X GET $plex_api_url
|
||||||
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user