1.0.061 - Fallback to Musicbrainz for artistImvdbUrl

pull/153/head
RandomNinjaAtk 2 years ago committed by GitHub
parent a3bff09280
commit 76417c2a4f
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.060" scriptVersion="1.0.061"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
@ -628,6 +628,13 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do
artistImvdbUrl=$(echo $lidarrArtistData | jq -r '.links[] | select(.name=="imvdb") | .url') artistImvdbUrl=$(echo $lidarrArtistData | jq -r '.links[] | select(.name=="imvdb") | .url')
artistImvdbSlug=$(basename "$artistImvdbUrl") artistImvdbSlug=$(basename "$artistImvdbUrl")
if [ -z "$artistImvdbUrl" ]; then
tempmbzartistinfo="$(curl -s -A "$agent" "$musicbrainzMirror/ws/2/artist/$lidarrArtistId?inc=url-rels+genres&fmt=json")"
sleep 1
artistImvdbUrl="$(echo "$tempmbzartistinfo" | jq -r ".relations | .[] | .url | select(.resource | contains(\"imvdb\")) | .resource")"
artistImvdbSlug=$(basename "$artistImvdbUrl")
fi
CacheMusicbrainzRecords CacheMusicbrainzRecords
ImvdbCache ImvdbCache

Loading…
Cancel
Save