@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion = "1.0.12 8 "
scriptVersion = "1.0.12 9 "
lidarrUrlBase = " $( cat /config/config.xml | xq | jq -r .Config.UrlBase) "
if [ " $lidarrUrlBase " = "null" ] ; then
lidarrUrlBase = ""
@ -1234,8 +1234,9 @@ ArtistDeezerSearch () {
downloadedReleaseDate = " $( echo ${ deezerArtistAlbumData } | jq -r .release_date) "
downloadedReleaseYear = " ${ downloadedReleaseDate : 0 : 4 } "
diff = $( levenshtein " ${ lidarrAlbumReleaseTitleClean ,, } " " ${ deezerAlbumTitleClean ,, } " )
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $deezerAlbumTitleClean :: Checking for Match... "
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $deezerAlbumTitleClean :: Calculating Similarity... "
diff = $( levenshtein " ${ lidarrAlbumReleaseTitleClean ,, } " " ${ deezerAlbumTitleClean ,, } " )
if [ " $diff " -le "5" ] ; then
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $deezerAlbumTitleClean :: Deezer MATCH Found :: Calculated Difference = $diff "
@ -1301,8 +1302,10 @@ FuzzyDeezerSearch () {
deezerAlbumTitle = $( echo " $deezerAlbumData " | jq -r .title | head -n1)
lidarrAlbumReleaseTitleClean = $( echo " $lidarrAlbumReleaseTitle " | sed -e "s%[^[:alpha:][:digit:]]%%g" -e "s/ */ /g" | sed 's/^[.]*//' | sed 's/[.]*$//g' | sed 's/^ *//g' | sed 's/ *$//g' )
deezerAlbumTitleClean = $( echo ${ deezerAlbumTitle } | sed -e "s%[^[:alpha:][:digit:]]%%g" -e "s/ */ /g" | sed 's/^[.]*//' | sed 's/[.]*$//g' | sed 's/^ *//g' | sed 's/ *$//g' )
diff = $( levenshtein " ${ lidarrAlbumReleaseTitleClean ,, } " " ${ deezerAlbumTitleClean ,, } " )
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $deezerAlbumTitleClean :: Checking for Match... "
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $deezerAlbumTitleClean :: Calculating Similarity... "
diff = $( levenshtein " ${ lidarrAlbumReleaseTitleClean ,, } " " ${ deezerAlbumTitleClean ,, } " )
if [ " $diff " -le "5" ] ; then
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $deezerAlbumTitleClean :: Deezer MATCH Found :: Calculated Difference = $diff "
DownloadProcess " $deezerAlbumID " "DEEZER" " $lidarrAlbumReleaseYear " " $lidarrAlbumReleaseTitle "
@ -1360,9 +1363,9 @@ ArtistTidalSearch () {
downloadedReleaseDate = $( echo $tidalArtistAlbumData | jq -r '.streamStartDate' )
fi
downloadedReleaseYear = " ${ downloadedReleaseDate : 0 : 4 } "
diff = $( levenshtein " ${ lidarrAlbumReleaseTitleClean ,, } " " ${ tidalAlbumTitleClean ,, } " )
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $tidalAlbumTitleClean :: Checking for Match... "
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $tidalAlbumTitleClean :: Calculating Similarity... "
diff = $( levenshtein " ${ lidarrAlbumReleaseTitleClean ,, } " " ${ tidalAlbumTitleClean ,, } " )
if [ " $diff " -le "5" ] ; then
log " :: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumReleaseTitleClean vs $tidalAlbumTitleClean :: Tidal MATCH Found :: Calculated Difference = $diff "