Update download.sh

pull/6/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 9f37ad064e
commit a52a3318ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,8 +11,10 @@ log () {
}
mkdir -p /config/xdg
touch /config/xdg.tidal-dl.log
TidalClientSetup () {
touch /config/xdg/.tidal-dl.log
if [ ! -f /config/xdg/.tidal-dl.json ]; then
log "TIDAL :: No default config found, importing default config \"tidal.json\""
if [ -f /scripts/tidal-dl.json ]; then
@ -50,7 +52,7 @@ if [ ! -f /config/xdg/.tidal-dl.token.json ]; then
log "TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client..."
tidal-dl
fi
}
DownloadProcess () {
downloadedAlbumTitleClean="$(echo "$downloadedAlbumTitle" | sed -e "s%[^[:alpha:][:digit:]._' ]% %g" -e "s/ */ /g" | sed 's/^[.]*//' | sed 's/[.]*$//g' | sed 's/^ *//g' | sed 's/ *$//g')"
@ -157,7 +159,7 @@ NotifyLidarrForImport () {
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: LIDARR IMPORT NOTIFICATION SENT! :: $1"
}
DeemixClientSetup () {
if [ ! -z "$arlToken" ]; then
# Create directories
mkdir -p /config/{cache,logs}
@ -171,7 +173,7 @@ if [ ! -z "$arlToken" ]; then
else
log "ERROR: arlToken setting invalid, currently set to: $arlToken"
fi
fi
GetMissingCutOffList () {
log "Downloading missing list..."
@ -694,6 +696,12 @@ LidarrTaskStatusCheck () {
done
}
if [ "$dlClientSource" = "deezer" ] || [ "$dlClientSource" = "both" ]; then
DeemixClientSetup
if [ "$dlClientSource" = "tidal" ] || [ "$dlClientSource" = "both" ]; then
TidalClientSetup
fi
if [ "$dlClientSource" = "deezer" ] || [ "$dlClientSource" = "tidal" ] || [ "$dlClientSource" = "both" ]; then
GetMissingCutOffList
SearchProcess

Loading…
Cancel
Save