1.0.285 - attempt to improve cutoff upgrade process

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

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.284"
scriptVersion="1.0.285"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" == "null" ]; then
@ -764,6 +764,7 @@ DownloadProcess () {
chmod -R 777 "$downloadPath"/complete
if [ -d "$downloadPath/complete/$downloadedAlbumFolder" ]; then
cutoffNotify="true"
NotifyLidarrForImport "$downloadPath/complete/$downloadedAlbumFolder"
LidarrTaskStatusCheck
@ -1183,6 +1184,7 @@ SearchProcess () {
lidarrAlbumType=$(echo "$lidarrAlbumData" | jq -r ".albumType")
lidarrAlbumTitle=$(echo "$lidarrAlbumData" | jq -r ".title")
lidarrAlbumForeignAlbumId=$(echo "$lidarrAlbumData" | jq -r ".foreignAlbumId")
cutoffNotify="false"
if [ -f "/config/extended/logs/notfound/$wantedAlbumId--$lidarrArtistForeignArtistId--$lidarrAlbumForeignAlbumId" ]; then
log "$processNumber of $wantedListAlbumTotal :: $wantedAlbumListSource :: $lidarrAlbumType :: $wantedAlbumListSource :: $lidarrArtistName :: $lidarrAlbumTitle :: Previously Not Found, skipping..."
@ -1930,6 +1932,14 @@ CheckLidarrBeforeImport () {
alreadyImported=true
return
fi
if [ "$wantedAlbumListSource" == "cutoff" ]; then
if [ "$cutoffNotify" != "true" ]; then
log "$processNumber of $wantedListAlbumTotal :: $wantedAlbumListSource :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Already Imported Album (CutOff), skipping..."
alreadyImported=true
cutoffNotiy="true"
return
fi
fi
fi
}

Loading…
Cancel
Save