@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion = "1.0.22 8 "
scriptVersion = "1.0.22 9 "
if [ -z " $lidarrUrl " ] || [ -z " $lidarrApiKey " ] ; then
lidarrUrlBase = " $( cat /config/config.xml | xq | jq -r .Config.UrlBase) "
if [ " $lidarrUrlBase " = "null" ] ; then
@ -1416,10 +1416,9 @@ ArtistDeezerSearch () {
resultsCount = $( echo " $deezerArtistAlbumsIds " | wc -l)
log " $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Artist Search :: Deezer :: $type :: $lidarrReleaseTitle :: $resultsCount search results found "
for deezerAlbumID in $( echo " $deezerArtistAlbumsIds " ) ; do
deezerAlbumData = " $( echo " $deezer Search" | jq -r " .album | select(.id==$deezerAlbumID ) " ) "
deezerAlbumData = " $( echo " $deezer ArtistAlbumsData" | jq -r " select(.id==$deezerAlbumID ) " ) "
deezerAlbumTitle = " $( echo " $deezerAlbumData " | jq -r ".title" ) "
deezerAlbumTitleClean = " $( echo ${ deezerAlbumTitle } | sed -e "s%[^[:alpha:][:digit:]]%%g" -e "s/ */ /g" | sed 's/^[.]*//' | sed 's/[.]*$//g' | sed 's/^ *//g' | sed 's/ *$//g' ) "
# String Character Count test, quicker than the levenshtein method to allow faster processing
characterMath = $(( ${# deezerAlbumTitleClean } - ${# lidarrAlbumReleaseTitleClean } ))
if [ $characterMath -gt 5 ] ; then
@ -1427,7 +1426,7 @@ ArtistDeezerSearch () {
elif [ $characterMath -lt 0 ] ; then
continue
fi
GetDeezerAlbumInfo " ${ deezerAlbumID } "
GetDeezerAlbumInfo " $deezerAlbumID "
deezerAlbumData = " $( cat " /config/extended/cache/deezer/ $deezerAlbumID .json " ) "
deezerAlbumTrackCount = " $( echo " $deezerAlbumData " | jq -r .nb_tracks) "
deezerAlbumExplicitLyrics = " $( echo " $deezerAlbumData " | jq -r .explicit_lyrics) "