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:
RandomNinjaAtk 2023-07-28 09:47:18 +00:00 committed by GitHub
parent 283958f39e
commit 2458a097fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"
}
@ -133,6 +136,8 @@ Configuration () {
log "Beets Tagging Disabled"
fi
log "Failed Download Attempt Theshold: $failedDownloadAttemptThreshold"
}
DownloadClientFreyr () {
@ -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