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

Loading…
Cancel
Save