From 84d37a3b5af5572fab53934195f3cac528effb2a Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 22 Feb 2024 08:22:08 -0500 Subject: [PATCH] test --- plex-emptytrash.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/plex-emptytrash.sh b/plex-emptytrash.sh index ab2abab..bad4a30 100644 --- a/plex-emptytrash.sh +++ b/plex-emptytrash.sh @@ -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}