log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: $imvdbProcessCount of $artistImvdbVideoUrlsCount :: Caching video data..."
if[ -f "$imvdbVideoData"];then
if[ ! -s "$imvdbVideoData"];then
if[ ! -s "$imvdbVideoData"];then# if empty, delete file
rm "$imvdbVideoData"
fi
fi
if[ -f "$imvdbVideoData"];then
if jq -e . >/dev/null 2>&1<<<"$(cat "$imvdbVideoData")";then# verify file is valid json
log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: $imvdbProcessCount of $artistImvdbVideoUrlsCount :: Video Data already downloaded"
log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: $imvdbProcessCount of $artistImvdbVideoUrlsCount :: Download Complete"
break
else
rm "$imvdbVideoData"
fi
fi
done
else
log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: $imvdbProcessCount of $artistImvdbVideoUrlsCount :: Video Data already downloaded"
fi
done
}
@ -659,7 +665,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do