v1.3 - Make grep, same as last grep change...

#54 - Helps?
This commit is contained in:
RandomNinjaAtk 2023-08-07 17:29:18 -04:00 committed by GitHub
parent 2892856885
commit 500ae99a9d
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.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)"