From 2892856885fdd9ae89cca7d70c8ba5a0e0f484f4 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 7 Aug 2023 17:44:53 +0000 Subject: [PATCH] v1.2 - Simplify Plex Library folder verification grep... #54 - Maybe this resolves it....? --- sonarr/PlexNotify.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonarr/PlexNotify.bash b/sonarr/PlexNotify.bash index 93a8bab..49a7059 100644 --- a/sonarr/PlexNotify.bash +++ b/sonarr/PlexNotify.bash @@ -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\""