|
|
@ -1,5 +1,5 @@
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
scriptVersion="1.0.6"
|
|
|
|
scriptVersion="1.0.7"
|
|
|
|
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
|
|
|
|
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
|
|
|
|
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
|
|
|
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
|
|
|
if [ "$lidarrUrlBase" == "null" ]; then
|
|
|
|
if [ "$lidarrUrlBase" == "null" ]; then
|
|
|
@ -1748,7 +1748,7 @@ LidarrTaskStatusCheck () {
|
|
|
|
alerted=no
|
|
|
|
alerted=no
|
|
|
|
until false
|
|
|
|
until false
|
|
|
|
do
|
|
|
|
do
|
|
|
|
taskCount=$(curl -s "$lidarrUrl/api/v1/command?apikey=${lidarrApiKey}" | jq -r '.[] | select(.status=="started") | .name' | grep -v "RescanFolders" | wc -l)
|
|
|
|
taskCount=$(curl -s "$lidarrUrl/api/v1/command?apikey=${lidarrApiKey}" | jq -r '.[] | select(.status=="started") | .name' | wc -l)
|
|
|
|
if [ "$taskCount" -ge "1" ]; then
|
|
|
|
if [ "$taskCount" -ge "1" ]; then
|
|
|
|
if [ "$alerted" == "no" ]; then
|
|
|
|
if [ "$alerted" == "no" ]; then
|
|
|
|
alerted=yes
|
|
|
|
alerted=yes
|
|
|
|