1.0.003 - Bug Fix for missing ALBUMARTIST tag

pull/139/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 97afc8430f
commit 2a660e6c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
version=1.0.002
version=1.0.003
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" == "null" ]; then
@ -31,7 +31,7 @@ if [ "$lidarr_eventtype" == "Test" ]; then
exit 0
fi
getAlbumArtist="$(curl -s "$lidarrUrl/api/v1/album/$lidarr_album_id" -H "X-Api-Key: ${lidarrApiKey}" | jq -r .artist.artistName)"
getTrackPath="$(curl -s "$lidarrUrl/api/v1/trackFile?albumId=$lidarr_album_id" -H "X-Api-Key: ${lidarrApiKey}" | jq -r .[].path | head -n1)"
getFolderPath="$(dirname "$getTrackPath")"
@ -65,6 +65,8 @@ ProcessWithBeets () {
metaflac --remove-tag=ALBUM_ARTIST "$file"
metaflac --remove-tag="ALBUM ARTIST" "$file"
metaflac --remove-tag=ARTISTSORT "$file"
metaflac --set-tag=ALBUMARTIST="$getAlbumArtist" "$file"
done
else
log "$1 :: ERROR :: Unable to match using beets to a musicbrainz release..."

Loading…
Cancel
Save