File tree 1 file changed +13
-14
lines changed
1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- scriptVersion=" 1.7 "
2
+ scriptVersion=" 1.8 "
3
3
scriptName=" Video"
4
4
5
5
# ### Import Settings
@@ -11,7 +11,6 @@ log () {
11
11
}
12
12
13
13
set -e
14
- set -o pipefail
15
14
16
15
# auto-clean up log file to reduce space usage
17
16
if [ -f " /config/scripts/video.txt" ]; then
@@ -126,18 +125,18 @@ ArrWaitForTaskCompletion () {
126
125
alerted=no
127
126
until false
128
127
do
129
- arrtasks= $( curl -s " $arrUrl /api/v3/command?apikey= ${arrApiKey} " | jq -r ' .[] | select(.status=="started") | .name ' )
130
- taskCount=$( echo $arrtasks | wc -l)
131
- arrProcessMonitoredDownloadsCount= $( echo $arrtasks | grep " ProcessMonitoredDownloads" | wc -l)
132
- if [ " $taskCount " -ge 3 ] || [ " $arrProcessMonitoredDownloadsCount " -ge 1 ]; then
133
- if [ " $alerted " == " no" ]; then
134
- alerted=yes
135
- log " $count of $fileCount :: STATUS :: ARR APP BUSY :: Pausing/waiting for all active Arr app tasks to end..."
136
- fi
137
- sleep 2
138
- else
139
- break
140
- fi
128
+ log " $count of $fileCount :: STATUS :: Checking ARR App Status "
129
+ taskCount=$( curl -s " $arrUrl /api/v3/command?apikey= ${arrApiKey} " | jq -r ' .[] | select(.status=="started") | .name ' | wc -l)
130
+ arrDownloadTaskCount= $( curl -s " $arrUrl /api/v3/command?apikey= ${arrApiKey} " | jq -r ' .[] | select(.status=="started") | .name ' | grep " ProcessMonitoredDownloads" | wc -l)
131
+ if [ " $taskCount " -ge " 3 " ] || [ " $arrDownloadTaskCount " -ge " 1 " ]; then
132
+ if [ " $alerted " == " no" ]; then
133
+ alerted=yes
134
+ log " $count of $fileCount :: STATUS :: ARR APP BUSY :: Pausing/waiting for all active Arr app tasks to end..."
135
+ fi
136
+ sleep 2
137
+ else
138
+ break
139
+ fi
141
140
done
142
141
}
143
142
You can’t perform that action at this time.
0 commit comments