From 2458a097faa36b0bb6521de7afbb72ed3c4b3fdd Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 28 Jul 2023 09:47:18 +0000 Subject: [PATCH] v2.6 - New setting failedDownloadAttemptThreshold Make failed download attempts configurable, default is 6. #40 - This will likely not solve the issue, but a good idea, so implemented anyways. I have further plans to build in a workaround... --- lidarr/Audio.service.bash | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lidarr/Audio.service.bash b/lidarr/Audio.service.bash index 485e11d..fa9c501 100644 --- a/lidarr/Audio.service.bash +++ b/lidarr/Audio.service.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="2.5" +scriptVersion="2.6" scriptName="Audio" ### Import Settings @@ -23,6 +23,9 @@ verifyConfig () { downloadPath="/config/extended/downloads" fi + if [ -z "$failedDownloadAttemptThreshold" ]; then + failedDownloadAttemptThreshold="6" + fi audioPath="$downloadPath/audio" } @@ -132,6 +135,8 @@ Configuration () { else log "Beets Tagging Disabled" fi + + log "Failed Download Attempt Theshold: $failedDownloadAttemptThreshold" } @@ -419,8 +424,8 @@ DownloadProcess () { deemixFail=0 fi - # If download failes 6 times, exit with error... - if [ $deemixFail -eq 6 ]; then + # If download failes X times, exit with error... + if [ $deemixFail -eq $failedDownloadAttemptThreshold ]; then log "DEEZER :: ERROR :: Download failed" log "DEEZER :: ERROR :: Please review log for errors in client" log "DEEZER :: ERROR :: Try updating your ARL Token to possibly resolve the issue..." @@ -446,8 +451,8 @@ DownloadProcess () { tidaldlFail=0 fi - # If download failes 6 times, exit with error... - if [ $tidaldlFail -eq 6 ]; then + # If download failes X times, exit with error... + if [ $tidaldlFail -eq $failedDownloadAttemptThreshold ]; then if [ -f /config/xdg/.tidal-dl.token.json ]; then rm /config/xdg/.tidal-dl.token.json fi