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...
This commit is contained in:
parent
283958f39e
commit
2458a097fa
1 changed files with 10 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
scriptVersion="2.5"
|
scriptVersion="2.6"
|
||||||
scriptName="Audio"
|
scriptName="Audio"
|
||||||
|
|
||||||
### Import Settings
|
### Import Settings
|
||||||
|
@ -23,6 +23,9 @@ verifyConfig () {
|
||||||
downloadPath="/config/extended/downloads"
|
downloadPath="/config/extended/downloads"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$failedDownloadAttemptThreshold" ]; then
|
||||||
|
failedDownloadAttemptThreshold="6"
|
||||||
|
fi
|
||||||
audioPath="$downloadPath/audio"
|
audioPath="$downloadPath/audio"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +135,8 @@ Configuration () {
|
||||||
else
|
else
|
||||||
log "Beets Tagging Disabled"
|
log "Beets Tagging Disabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
log "Failed Download Attempt Theshold: $failedDownloadAttemptThreshold"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -419,8 +424,8 @@ DownloadProcess () {
|
||||||
deemixFail=0
|
deemixFail=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If download failes 6 times, exit with error...
|
# If download failes X times, exit with error...
|
||||||
if [ $deemixFail -eq 6 ]; then
|
if [ $deemixFail -eq $failedDownloadAttemptThreshold ]; then
|
||||||
log "DEEZER :: ERROR :: Download failed"
|
log "DEEZER :: ERROR :: Download failed"
|
||||||
log "DEEZER :: ERROR :: Please review log for errors in client"
|
log "DEEZER :: ERROR :: Please review log for errors in client"
|
||||||
log "DEEZER :: ERROR :: Try updating your ARL Token to possibly resolve the issue..."
|
log "DEEZER :: ERROR :: Try updating your ARL Token to possibly resolve the issue..."
|
||||||
|
@ -446,8 +451,8 @@ DownloadProcess () {
|
||||||
tidaldlFail=0
|
tidaldlFail=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If download failes 6 times, exit with error...
|
# If download failes X times, exit with error...
|
||||||
if [ $tidaldlFail -eq 6 ]; then
|
if [ $tidaldlFail -eq $failedDownloadAttemptThreshold ]; then
|
||||||
if [ -f /config/xdg/.tidal-dl.token.json ]; then
|
if [ -f /config/xdg/.tidal-dl.token.json ]; then
|
||||||
rm /config/xdg/.tidal-dl.token.json
|
rm /config/xdg/.tidal-dl.token.json
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue