From fe5aba277fd8a4e527f54a704d8fbb9170cbba8b Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 22 Feb 2024 08:16:40 -0500 Subject: [PATCH] test --- plex-cleanbundles.sh | 6 ------ plex-emptytrash.sh | 7 ++++--- plex-freshen.sh | 2 +- plex-refreshmetadata.sh | 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/plex-cleanbundles.sh b/plex-cleanbundles.sh index be7f69b..79452be 100644 --- a/plex-cleanbundles.sh +++ b/plex-cleanbundles.sh @@ -25,9 +25,3 @@ case "$2" in ""|api) update_from_api;; *) echo "'$2' is not a valid plex-tools freshen command";; esac - - -# clean PhotoTranscoder Cache -#echo "Deleting PhotoTranscoder Cache" -#CACHEPATH="$AppSuppDir/Plex Media Server/Cache/PhotoTranscoder" -#find "${CACHEPATH}" -type f -delete diff --git a/plex-emptytrash.sh b/plex-emptytrash.sh index d7532d9..33834b2 100644 --- a/plex-emptytrash.sh +++ b/plex-emptytrash.sh @@ -19,10 +19,11 @@ update_from_api() { source ./plex-library-ids.sh # run a loop against each library - for i in "${!LOCAL_LIBRARIES_[@]}" + for index in ${!LOCAL_LIBRARIES_[*]}; do do - library_id="${LOCAL_LIBRARIES_IDS[i]}" - library_title="${LOCAL_LIBRARIES_TITLES[i]}" + library_id=${LOCAL_LIBRARIES_IDS[$index]} + #"${LOCAL_LIBRARIES_IDS[index]}" + library_title="${LOCAL_LIBRARIES_TITLES[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} diff --git a/plex-freshen.sh b/plex-freshen.sh index a109ab2..9c613ee 100644 --- a/plex-freshen.sh +++ b/plex-freshen.sh @@ -19,7 +19,7 @@ update_from_api() { source ./plex-library-ids.sh # run a loop against each library - for library_number in $LOCAL_LIBRARIES_ID + for library_number in $LOCAL_LIBRARIES_IDS do echo "Running Library Update and metadata refresh for key: ${library_number}" diff --git a/plex-refreshmetadata.sh b/plex-refreshmetadata.sh index ab94432..663d64c 100644 --- a/plex-refreshmetadata.sh +++ b/plex-refreshmetadata.sh @@ -20,7 +20,7 @@ update_from_api() { source ./plex-library-ids.sh # run a loop against each library - for library_number in $LOCAL_LIBRARIES_ID + for library_number in $LOCAL_LIBRARIES_IDS do echo "Running Library Update and metadata refresh for key: ${library_number}" curl -X GET http://127.0.0.1:32400/library/sections/${library_number}/refresh\?force=1\&X-Plex-Token=${LOCAL_PLEX_TOKEN}