This commit is contained in:
deathbybandaid 2024-02-22 08:22:08 -05:00
parent 035914fb2d
commit 84d37a3b5a

View File

@ -23,17 +23,12 @@ update_from_api() {
# run a loop against each library
echo "Emptying Trash for all libraries"
i=0
while [ $i -lt ${#array[*]} ]; do
echo ${array[$i]} is in ${array2[$i]}
i=$(( $i + 1));
done
for index in ${!LOCAL_LIBRARIES_[*]}
for index in ${!array[*]}
do
library_id=${LOCAL_LIBRARIES_IDS[$index]}
library_id=${array[$index]}
#"${LOCAL_LIBRARIES_IDS[index]}"
library_title="${LOCAL_LIBRARIES_TITLES[index]}"
library_title="${array2[index]}"
echo "Emptying Trash for Library: ${library_id} ${library_title}"
curl -X GET http://127.0.0.1:32400/library/sections/${library_id}/emptyTrash\?X-Plex-Token=${LOCAL_PLEX_TOKEN}