Update QueueCleaner.bash

This commit is contained in:
RandomNinjaAtk 2023-03-18 10:35:20 -04:00 committed by GitHub
parent 87482481e0
commit 8b82a29dce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.0" scriptVersion="1.0.0"
######## Dependancy Installation
pip install --upgrade --no-cache-dir -U yq
log () { log () {
m_time=`date "+%F %T"` m_time=`date "+%F %T"`
echo $m_time" :: QueueCleaner :: $scriptVersion :: "$1 echo $m_time" :: QueueCleaner :: $scriptVersion :: "$1
@ -34,7 +37,7 @@ QueueCleanerProcess () {
fi fi
if [ "$arrName" == "Radarr" ]; then if [ "$arrName" == "Radarr" ]; then
arrQueueData="$(curl -s "$arrUrl/api/v3/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownMovieItems=true&apikey=${arrApiKey}" arrQueueData="$(curl -s "$arrUrl/api/v3/queue?page=1&pagesize=200&sortDirection=descending&sortKey=progress&includeUnknownMovieItems=true&apikey=${arrApiKey}" | jq -r .records[])"
fi fi
if [ "$arrName" == "Lidarr" ]; then if [ "$arrName" == "Lidarr" ]; then
@ -61,7 +64,7 @@ QueueCleanerProcess () {
fi fi
} }
log "Waiting for Sonarr to startup..." log "Waiting for $arrName to startup, sleeping for 2 minutes..."
sleep 2m sleep 2m
log "Starting Script...." log "Starting Script...."
for (( ; ; )); do for (( ; ; )); do