v1.2 - Simplify Plex Library folder verification grep...

#54 - Maybe this resolves it....?
This commit is contained in:
RandomNinjaAtk 2023-08-07 17:44:53 +00:00 committed by GitHub
parent 42517a6ee4
commit 2892856885
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.1"
scriptVersion="1.2"
notfidedBy="Sonarr"
arrRootFolderPath="$(dirname "$sonarr_series_path")"
arrFolderPath="$sonarr_series_path"
@ -79,7 +79,7 @@ else
plexKeys=($(echo "$plexLibraries" | xq ".MediaContainer.Directory" | jq -r '."@key"'))
fi
if echo "$plexLibraryData" | grep "\"@path\": \"$arrRootFolderPath" | read; then
if echo "$plexLibraryData" | grep "path" | grep "$arrRootFolderPath" | read; then
sleep 0.01
else
log "$notfidedBy :: ERROR: No Plex Library found containing path \"$arrRootFolderPath\""