From 014543eb57dc3080df286ee4f4c2602acb6c5271 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 20 Jul 2023 11:33:55 +0000 Subject: [PATCH] v1.9 - Bug Fix for adding Sometimes artist name and mbid would repeat, causing it to fail, this should resolve that... --- lidarr/AutoArtistAdder.bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lidarr/AutoArtistAdder.bash b/lidarr/AutoArtistAdder.bash index b0ce957..13162fd 100644 --- a/lidarr/AutoArtistAdder.bash +++ b/lidarr/AutoArtistAdder.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="1.8" +scriptVersion="1.9" scriptName="AutoArtistAdder" ### Import Settings @@ -89,8 +89,8 @@ AddDeezerArtistToLidarr () { if [ ! -z "$lidarrArtistMatchedData" ]; then data="$lidarrArtistMatchedData" - artistName="$(echo "$data" | jq -r ".artist.artistName")" - foreignId="$(echo "$data" | jq -r ".foreignId")" + artistName="$(echo "$data" | jq -r ".artist.artistName" | head -n1)" + foreignId="$(echo "$data" | jq -r ".foreignId" | head -n1)" importListExclusionData=$(curl -s "$arrUrl/api/v1/importlistexclusion" -H "X-Api-Key: $arrApiKey" | jq -r ".[].foreignId") if echo "$importListExclusionData" | grep "^${foreignId}$" | read; then log "$currentprocess of $getDeezerArtistsIdsCount :: $deezerArtistName :: ERROR :: Artist is on import exclusion block list, skipping...." @@ -240,8 +240,8 @@ AddTidalArtistToLidarr () { if [ ! -z "$lidarrArtistMatchedData" ]; then data="$lidarrArtistMatchedData" - artistName="$(echo "$data" | jq -r ".artist.artistName")" - foreignId="$(echo "$data" | jq -r ".foreignId")" + artistName="$(echo "$data" | jq -r ".artist.artistName" | head -n1)" + foreignId="$(echo "$data" | jq -r ".foreignId" | head -n1)" importListExclusionData=$(curl -s "$arrUrl/api/v1/importlistexclusion" -H "X-Api-Key: $arrApiKey" | jq -r ".[].foreignId") if echo "$importListExclusionData" | grep "^${foreignId}$" | read; then log "$artistNumber of $lidarrArtistTotal :: $lidarrArtistName :: $currentprocess of $numberOfRelatedArtistsToAddPerArtist :: $serviceArtistName :: ERROR :: Artist is on import exclusion block list, skipping...."