From 5fbce60b56c1197df548bcbe47f8854819fffe4f Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 20 Jun 2022 11:33:27 -0400 Subject: [PATCH] 1.0.0034 - Better error messaging and audioFormat/audioBitrate configuration validation --- root/scripts/download.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index a544aac..823f935 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -38,7 +38,7 @@ Configuration () { log "" sleep 2 log "############# $dockerTitle" - log "############# SCRIPT VERSION 1.0.0033" + log "############# SCRIPT VERSION 1.0.0034" log "############# DOCKER VERSION $dockerVersion" if [ -z $topLimit ]; then @@ -93,13 +93,21 @@ DownloadFormat () { tidal-dl -q Normal deemixQuality=128 else - log ":: ERROR :: Invalid quality options set..." + log ":: ERROR :: Invalid audioFormat and audioBitrate options set..." + log ":: ERROR :: Change audioBitrate to a low, high, or lossless..." log ":: ERROR :: Exiting..." exit fi else - tidal-dl -q HiFi - deemixQuality=flac + if [ $audioBitrate = lossless ] || [ $audioBitrate = high ] || [ $audioBitrate = low ]; then + log ":: ERROR :: Invalid audioFormat and audioBitrate options set..." + log ":: ERROR :: Change audioBitrate to a desired bitrate number, example: 192..." + log ":: ERROR :: Exiting..." + exit + else + tidal-dl -q HiFi + deemixQuality=flac + fi fi }