1.0.125 - Adjust Fuzzy Search Artist Name santization process

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

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.124" scriptVersion="1.0.125"
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" = "null" ]; then if [ "$lidarrUrlBase" = "null" ]; then
lidarrUrlBase="" lidarrUrlBase=""
@ -1279,7 +1279,7 @@ FuzzyDeezerSearch () {
lidarrArtistData=$(echo "${lidarrAlbumData}" | jq -r ".artist") lidarrArtistData=$(echo "${lidarrAlbumData}" | jq -r ".artist")
lidarrArtistForeignArtistId=$(echo "${lidarrArtistData}" | jq -r ".foreignArtistId") lidarrArtistForeignArtistId=$(echo "${lidarrArtistData}" | jq -r ".foreignArtistId")
lidarrArtistName=$(echo "${lidarrArtistData}" | jq -r ".artistName") lidarrArtistName=$(echo "${lidarrArtistData}" | jq -r ".artistName")
lidarrArtistNameSanitized="$(basename "${lidarrArtistPath}" | sed 's% (.*)$%%g')" lidarrArtistNameSanitized="$(echo "$lidarrArtistName" | sed -e "s%[^[:alpha:][:digit:]]% %g" -e "s/ */ /g")"
albumArtistNameSearch="$(jq -R -r @uri <<<"${lidarrArtistNameSanitized}")" albumArtistNameSearch="$(jq -R -r @uri <<<"${lidarrArtistNameSanitized}")"
for lidarrAlbumReleaseId in $(echo "$lidarrAlbumReleaseIds"); do for lidarrAlbumReleaseId in $(echo "$lidarrAlbumReleaseIds"); do
log ":: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: Searching Deezer for Album..." log ":: $1 :: $lidarrArtistName :: $lidarrAlbumTitle :: Searching Deezer for Album..."

Loading…
Cancel
Save