From 500ae99a9da51177b19725e62eca5612eb2be8bd Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 7 Aug 2023 17:29:18 -0400 Subject: [PATCH] v1.3 - Make grep, same as last grep change... #54 - Helps? --- sonarr/PlexNotify.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonarr/PlexNotify.bash b/sonarr/PlexNotify.bash index 49a7059..10aedf7 100644 --- a/sonarr/PlexNotify.bash +++ b/sonarr/PlexNotify.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.2" +scriptVersion="1.3" notfidedBy="Sonarr" arrRootFolderPath="$(dirname "$sonarr_series_path")" arrFolderPath="$sonarr_series_path" @@ -90,7 +90,7 @@ fi for key in ${!plexKeys[@]}; do plexKey="${plexKeys[$key]}" plexKeyData="$(echo "$plexLibraryData" | jq -r "select(.\"@key\"==\"$plexKey\")")" - if echo "$plexKeyData" | grep "\"@path\": \"$arrRootFolderPath" | read; then + if echo "$plexKeyData" | grep "path" | grep "$arrRootFolderPath" | read; then plexFolderEncoded="$(jq -R -r @uri <<<"$arrFolderPath")" curl -s "$plexUrl/library/sections/$plexKey/refresh?path=$plexFolderEncoded&X-Plex-Token=$plexToken" log "$notfidedBy :: Plex Scan notification sent! ($arrFolderPath)"