v1.0.229 - Major bug fix for deezer artist search process

Really not sure how this was missed, but it was basically non-functional... Probably a copypasta mistake...
pull/60/head
RandomNinjaAtk 3 years ago committed by GitHub
parent dfe7d35ff1
commit 0954f51a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.228"
scriptVersion="1.0.229"
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 "$deezerSearch" | jq -r ".album | select(.id==$deezerAlbumID)")"
deezerAlbumData="$(echo "$deezerArtistAlbumsData" | 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)"

Loading…
Cancel
Save