2.43 - Add interval sleep before exit

This commit is contained in:
hockeygoalie35 2024-04-27 23:28:26 -04:00 committed by GitHub
parent 609c9085b3
commit 7ba54e61eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash
scriptVersion="2.42"
scriptVersion="2.43"
scriptName="Audio"
### Import Settings
@ -206,6 +206,8 @@ DownloadFormat () {
log "ERROR :: Change audioBitrate to a low, high, or lossless..."
log "ERROR :: Exiting..."
NotifyWebhook "FatalError" "Invalid audioFormat and audioBitrate options set"
log "Script sleeping for $audioScriptInterval..."
sleep $audioScriptInterval
exit
fi
else
@ -228,6 +230,8 @@ DownloadFormat () {
log "ERROR :: Change audioBitrate to a desired bitrate number, example: 192..."
log "ERROR :: Exiting..."
NotifyWebhook "FatalError" "audioBitrate options set"
log "Script sleeping for $audioScriptInterval..."
sleep $audioScriptInterval
exit
fi
@ -244,6 +248,8 @@ DownloadFormat () {
log "ERROR :: Invalid audioFormat options set..."
log "ERROR :: Change audioFormat to a desired format (opus or mp3 or aac or alac)"
NotifyWebhook "FatalError" "audioFormat options set"
log "Script sleeping for $audioScriptInterval..."
sleep $audioScriptInterval
exit
fi
@ -369,6 +375,8 @@ TidalClientTest () {
rm -rf "$audioPath"/incomplete/*
NotifyWebhook "Error" "TIDAL not authenticated but configured"
tidalClientTest="failed"
log "Script sleeping for $audioScriptInterval..."
sleep $audioScriptInterval
exit
else
rm -rf "$audioPath"/incomplete/*
@ -972,6 +980,8 @@ DeezerClientTest () {
rm -rf $audioPath/incomplete/*
NotifyWebhook "Error" "DEEZER not authenticated but configured"
deezerClientTest="fail"
log "Script sleeping for $audioScriptInterval..."
sleep $audioScriptInterval
exit
else
rm -rf $audioPath/incomplete/*
@ -987,6 +997,8 @@ LidarrRootFolderCheck () {
log "ERROR :: Configure root folder in Lidarr to continue..."
log "ERROR :: Exiting..."
NotifyWebhook "FatalError" "No root folder found"
log "Script sleeping for $audioScriptInterval..."
sleep $audioScriptInterval
exit
fi
}