1.0.301 - retryNotFound

#150
pull/153/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 029138408e
commit 0c1e2e2358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.300" scriptVersion="1.0.301"
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
@ -256,11 +256,11 @@ DownloadFolderCleaner () {
NotFoundFolderCleaner () { NotFoundFolderCleaner () {
# check for completed download folder # check for completed download folder
if [ -d /config/extended/logs/notfound ]; then if [ -d /config/extended/logs/notfound ]; then
# check for notfound entries older than 90 days # check for notfound entries older than X days
if find /config/extended/logs/notfound -mindepth 1 -type f -mtime +90 | read; then if find /config/extended/logs/notfound -mindepth 1 -type f -mtime +$retryNotFound | read; then
log "Removing prevously notfound lidarr album ids older than 90 days to give them a retry..." log "Removing prevously notfound lidarr album ids older than $retryNotFound days to give them a retry..."
# delete ntofound entries older than 90 days # delete ntofound entries older than X days
find /config/extended/logs/notfound -mindepth 1 -type f -mtime +90 -delete find /config/extended/logs/notfound -mindepth 1 -type f -mtime +$retryNotFound -delete
fi fi
fi fi
} }

Loading…
Cancel
Save