Update download.sh

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

@ -216,6 +216,7 @@ SearchProcess () {
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Previously Not Found, skipping..." log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Previously Not Found, skipping..."
continue continue
fi fi
for dId in ${!deezeArtistIds[@]}; do for dId in ${!deezeArtistIds[@]}; do
deezeArtistId="${deezeArtistIds[$dId]}" deezeArtistId="${deezeArtistIds[$dId]}"
if [ ! -d /config/cache/deezer ]; then if [ ! -d /config/cache/deezer ]; then
@ -245,7 +246,7 @@ SearchProcess () {
done done
CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" "notbeets"
if [ $alreadyImported = true ]; then if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..." log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..."
continue continue
@ -279,7 +280,7 @@ SearchProcess () {
fi fi
done done
CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" "notbeets"
if [ $alreadyImported = true ]; then if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..." log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..."
continue continue
@ -310,7 +311,7 @@ SearchProcess () {
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: No Explicit Tidal Match Found" log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: No Explicit Tidal Match Found"
fi fi
CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" "notbeets"
if [ $alreadyImported = true ]; then if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..." log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..."
continue continue
@ -345,7 +346,7 @@ SearchProcess () {
fi fi
done done
CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" "notbeets"
if [ $alreadyImported = true ]; then if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..." log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..."
continue continue
@ -423,7 +424,7 @@ ProcessWithBeets () {
rm -rf "$1" rm -rf "$1"
return return
else else
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle ::BEETS MATCH FOUND!" log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: BEETS MATCH FOUND!"
fi fi
GetFile=$(find "$1" -type f -iname "*.flac" | head -n1) GetFile=$(find "$1" -type f -iname "*.flac" | head -n1)
@ -439,11 +440,19 @@ ProcessWithBeets () {
matchedLidarrAlbumArtistName="$(echo "$matchedLidarrAlbumData" | jq -r ".artist.artistName")" matchedLidarrAlbumArtistName="$(echo "$matchedLidarrAlbumData" | jq -r ".artist.artistName")"
matchedLidarrAlbumArtistCleanName="$(echo "$matchedLidarrAlbumData" | jq -r ".artist.cleanName")" matchedLidarrAlbumArtistCleanName="$(echo "$matchedLidarrAlbumData" | jq -r ".artist.cleanName")"
CheckLidarrBeforeImport "$matchedTagsAlbumReleaseGroupId" if [ ! -d /config/logs/downloaded/found ]; then
mkdir -p /config/logs/downloaded/found
fi
touch /config/logs/downloaded/found/$matchedTagsAlbumReleaseGroupId
CheckLidarrBeforeImport "$matchedTagsAlbumReleaseGroupId" "beets"
if [ $alreadyImported = true ]; then if [ $alreadyImported = true ]; then
rm -rf "$1" rm -rf "$1"
return return
fi fi
if [ "${matchedLidarrAlbumArtistCleanName}" != "null" ]; then if [ "${matchedLidarrAlbumArtistCleanName}" != "null" ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $matchedLidarrAlbumArtistName ($matchedLidarrAlbumArtistId) found in Lidarr" log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $matchedLidarrAlbumArtistName ($matchedLidarrAlbumArtistId) found in Lidarr"
@ -491,10 +500,18 @@ CheckLidarrBeforeImport () {
lidarrPercentOfTracks=0 lidarrPercentOfTracks=0
fi fi
if [ $lidarrPercentOfTracks -gt 0 ]; then if [ $lidarrPercentOfTracks -gt 0 ]; then
log ":: ERROR :: Already Imported" log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: ERROR :: Already Imported"
alreadyImported=true alreadyImported=true
return return
fi fi
if [ "$2" = "notbeets" ]; then
if [ -f "/config/logs/downloaded/found/$1" ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: ERROR :: Previously Found, skipping..."
alreadyImported=true
return
fi
fi
} }
GetMissingCutOffList GetMissingCutOffList

Loading…
Cancel
Save