v1.0.120 - use fuzzy search for fallback when regular searches fail

pull/16/head
RandomNinjaAtk 2 years ago committed by GitHub
parent e376d012fa
commit 4fece04d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.119"
scriptVersion="1.0.120"
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" = "null" ]; then
lidarrUrlBase=""
@ -1275,8 +1275,29 @@ SearchProcess () {
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Clean Albums Disabled, skipping clean search..."
fi
done
# Fallback/last resort Fuzzy Search
if [ $audioLyricType = both ]; then
if [ "$skipDeezer" = "false" ]; then
# Verify it's not already imported into Lidarr
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..."
continue
fi
FuzzyDeezerSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId"
fi
fi
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Already Imported, skipping..."
continue
fi
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Album Not found"
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Album Not found"
if [ ! -d /config/extended/logs/downloaded/notfound ]; then
mkdir -p /config/extended/logs/downloaded/notfound
chmod 777 /config/extended/logs/downloaded/notfound

Loading…
Cancel
Save