From 77a0f6adbd005f68fd2afe9c39b8c0f146c0fdb7 Mon Sep 17 00:00:00 2001 From: Makario1337 <74052988+Makario1337@users.noreply.github.com> Date: Fri, 9 Dec 2022 21:37:49 +0100 Subject: [PATCH 1/2] Make Webhook silent --- root/scripts/Audio.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/scripts/Audio.sh b/root/scripts/Audio.sh index d8fcbde..984d81d 100644 --- a/root/scripts/Audio.sh +++ b/root/scripts/Audio.sh @@ -1913,7 +1913,7 @@ NotifyWebhook () { if [ "$webHook" ] then content="$1: $2" - curl -X POST "{$webHook}" -H 'Content-Type: application/json' -d '{"event":"'"$1"'", "message":"'"$2"'", "content":"'"$content"'"}' + curl -s -X POST "{$webHook}" -H 'Content-Type: application/json' -d '{"event":"'"$1"'", "message":"'"$2"'", "content":"'"$content"'"}' fi } From eda0029b3bbd71d61e8bb74ee84115ba6da31087 Mon Sep 17 00:00:00 2001 From: Makario1337 <74052988+Makario1337@users.noreply.github.com> Date: Fri, 9 Dec 2022 21:38:50 +0100 Subject: [PATCH 2/2] Add Webhook to missing artists on MB --- root/scripts/AutoArtistAdder.bash | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/root/scripts/AutoArtistAdder.bash b/root/scripts/AutoArtistAdder.bash index 434dbf9..0a32cde 100644 --- a/root/scripts/AutoArtistAdder.bash +++ b/root/scripts/AutoArtistAdder.bash @@ -36,6 +36,14 @@ log () { echo $m_time" :: AutoArtistAdder :: $scriptVersion :: "$1 } +NotifyWebhook () { + if [ "$webHook" ] + then + content="$1: $2" + curl -s -X POST "{$webHook}" -H 'Content-Type: application/json' -d '{"event":"'"$1"'", "message":"'"$2"'", "content":"'"$content"'"}' + fi +} + AddDeezerTopArtists () { getDeezerArtistsIds=$(curl -s "https://api.deezer.com/chart/0/artists?limit=$1" | jq -r ".data[].id") getDeezerArtistsIdsCount=$(echo "$getDeezerArtistsIds" | wc -l) @@ -312,6 +320,7 @@ AddTidalArtistToLidarr () { lidarrAddArtist=$(curl -s "$lidarrUrl/api/v1/artist" -X POST -H 'Content-Type: application/json' -H "X-Api-Key: $lidarrApiKey" --data-raw "$data") else log "$artistNumber of $lidarrArtistTotal :: $lidarrArtistName :: $currentprocess of $numberOfRelatedArtistsToAddPerArtist :: $serviceArtistName :: ERROR :: Artist not found in Musicbrainz, please add \"https://listen.tidal.com/artist/${serviceArtistId}\" to the correct artist on Musicbrainz" + NotifyWebhook "Error" "Artist not found in Musicbrainz, please add to the correct artist on Musicbrainz" fi LidarrTaskStatusCheck done