From 2ca04c57307b4882b4b9b48ebf5cf8aa99cbfad6 Mon Sep 17 00:00:00 2001 From: randomuser345 Date: Tue, 13 Dec 2022 18:00:22 +0100 Subject: [PATCH 1/3] Adding specialized EventTypes --- root/scripts/Audio.sh | 22 +++++++++++----------- root/scripts/AutoArtistAdder.bash | 4 ++-- root/scripts/Video.sh | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/root/scripts/Audio.sh b/root/scripts/Audio.sh index a4d5236..3cf185e 100644 --- a/root/scripts/Audio.sh +++ b/root/scripts/Audio.sh @@ -192,7 +192,7 @@ DownloadFormat () { log "ERROR :: Invalid audioFormat and audioBitrate options set..." log "ERROR :: Change audioBitrate to a low, high, or lossless..." log "ERROR :: Exiting..." - NotifyWebhook "Error" "Invalid audioFormat and audioBitrate options set" + NotifyWebhook "FatalError" "Invalid audioFormat and audioBitrate options set" exit fi else @@ -214,7 +214,7 @@ DownloadFormat () { log "ERROR :: Invalid audioBitrate options set..." log "ERROR :: Change audioBitrate to a desired bitrate number, example: 192..." log "ERROR :: Exiting..." - NotifyWebhook "Error" "audioBitrate options set" + NotifyWebhook "FatalError" "audioBitrate options set" exit fi @@ -230,7 +230,7 @@ DownloadFormat () { if [ "$audioFormatError" == "true" ]; then log "ERROR :: Invalid audioFormat options set..." log "ERROR :: Change audioFormat to a desired format (opus or mp3 or aac or alac)" - NotifyWebhook "Error" "audioFormat options set" + NotifyWebhook "FatalError" "audioFormat options set" exit fi @@ -289,7 +289,7 @@ TidalClientSetup () { #log "TIDAL :: ERROR :: Downgrade tidal-dl for workaround..." #pip3 install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null log "TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client..." - NotifyWebhook "Error" "TIDAL requires authentication, please authenticate now (check logs)" + NotifyWebhook "FatalError" "TIDAL requires authentication, please authenticate now (check logs)" TidaldlStatusCheck tidal-dl fi @@ -456,7 +456,7 @@ DownloadProcess () { log "DEEZER :: ERROR :: Try updating your ARL Token to possibly resolve the issue..." log "DEEZER :: ERROR :: Exiting..." rm -rf "$downloadPath"/incomplete/* - NotifyWebhook "Error" "DEEZER not authenticated but configured" + NotifyWebhook "FatalError" "DEEZER not authenticated but configured" exit fi fi @@ -485,7 +485,7 @@ DownloadProcess () { log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..." log "TIDAL :: ERROR :: Exiting..." rm -rf "$downloadPath"/incomplete/* - NotifyWebhook "Error" "TIDAL not authenticated but configured" + NotifyWebhook "FatalError" "TIDAL not authenticated but configured" exit fi fi @@ -929,7 +929,7 @@ LidarrRootFolderCheck () { log "ERROR :: No root folder found" log "ERROR :: Configure root folder in Lidarr to continue..." log "ERROR :: Exiting..." - NotifyWebhook "Error" "No root folder found" + NotifyWebhook "FatalError" "No root folder found" exit fi } @@ -1162,7 +1162,7 @@ SearchProcess () { else echo "Update Musicbrainz Relationship Page: https://musicbrainz.org/artist/$lidarrArtistForeignArtistId/edit for \"${lidarrArtistName}\" with Deezer Artist Link" >> "/config/logs/deezer-artist-id-not-found.txt" chmod 777 "/config/logs/deezer-artist-id-not-found.txt" - NotifyWebhook "Error" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Deezer Artist Link" + NotifyWebhook "ArtisError" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Deezer Artist Link" fi skipDeezer=true fi @@ -1186,7 +1186,7 @@ SearchProcess () { else echo "Update Musicbrainz Relationship Page: https://musicbrainz.org/artist/$lidarrArtistForeignArtistId/edit for \"${lidarrArtistName}\" with Tidal Artist Link" >> "/config/logs/tidal-artist-id-not-found.txt" chmod 777 "/config/logs/tidal-artist-id-not-found.txt" - NotifyWebhook "Error" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Tidal Artist Link" + NotifyWebhook "ArtisError" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Tidal Artist Link" fi skipTidal=true fi @@ -1363,7 +1363,7 @@ SearchProcess () { else sleep 1.5 log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Tidal :: NOT FOUND!" - NotifyWebhook "Error" "$lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Tidal :: NOT FOUND! Please add it manually" + NotifyWebhook "AlbumError" "$lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Tidal :: NOT FOUND! Please add it manually" fi fi fi @@ -1404,7 +1404,7 @@ SearchProcess () { fi else log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Deezer :: NOT FOUND!" - NotifyWebhook "Error" "$lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Deezer :: NOT FOUND! Please add it manually" + NotifyWebhook "AlbumError" "$lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Deezer :: NOT FOUND! Please add it manually" fi fi fi diff --git a/root/scripts/AutoArtistAdder.bash b/root/scripts/AutoArtistAdder.bash index de0aa1a..59bcdb2 100644 --- a/root/scripts/AutoArtistAdder.bash +++ b/root/scripts/AutoArtistAdder.bash @@ -153,7 +153,7 @@ AddDeezerArtistToLidarr () { lidarrAddArtist=$(curl -s "$lidarrUrl/api/v1/artist" -X POST -H 'Content-Type: application/json' -H "X-Api-Key: $lidarrApiKey" --data-raw "$data") else log "$currentprocess of $getDeezerArtistsIdsCount :: $deezerArtistName :: Artist not found in Musicbrainz, please add \"https://deezer.com/artist/${deezerArtistId}\" to the correct artist on Musicbrainz" - NotifyWebhook "Error" "Artist not found in Musicbrainz, please add to the correct artist on Musicbrainz" + NotifyWebhook "ArtistError" "Artist not found in Musicbrainz, please add to the correct artist on Musicbrainz" fi LidarrTaskStatusCheck done @@ -321,7 +321,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" + NotifyWebhook "ArtisError" "Artist not found in Musicbrainz, please add to the correct artist on Musicbrainz" fi LidarrTaskStatusCheck done diff --git a/root/scripts/Video.sh b/root/scripts/Video.sh index 7c7395d..67f2dee 100644 --- a/root/scripts/Video.sh +++ b/root/scripts/Video.sh @@ -181,7 +181,7 @@ TidalClientSetup () { #pip install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null TidaldlStatusCheck log "TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client..." - NotifyWebhook "Error" "TIDAL requires authentication, please authenticate now (check logs)" + NotifyWebhook "VideoError" "TIDAL requires authentication, please authenticate now (check logs)" tidal-dl fi @@ -219,7 +219,7 @@ TidalClientTest () { log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..." log "TIDAL :: ERROR :: Exiting..." rm -rf "$downloadPath"/incomplete/* - NotifyWebhook "Error" "TIDAL not authenticated but configured" + NotifyWebhook "VideoError" "TIDAL not authenticated but configured" exit else rm -rf "$downloadPath"/incomplete/* From cde70e3032fafeecd2ef2666f0933c6d21c11c25 Mon Sep 17 00:00:00 2001 From: randomuser345 Date: Tue, 13 Dec 2022 18:03:17 +0100 Subject: [PATCH 2/3] fix typo --- root/scripts/Audio.sh | 4 ++-- root/scripts/AutoArtistAdder.bash | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/root/scripts/Audio.sh b/root/scripts/Audio.sh index 3cf185e..76708da 100644 --- a/root/scripts/Audio.sh +++ b/root/scripts/Audio.sh @@ -1162,7 +1162,7 @@ SearchProcess () { else echo "Update Musicbrainz Relationship Page: https://musicbrainz.org/artist/$lidarrArtistForeignArtistId/edit for \"${lidarrArtistName}\" with Deezer Artist Link" >> "/config/logs/deezer-artist-id-not-found.txt" chmod 777 "/config/logs/deezer-artist-id-not-found.txt" - NotifyWebhook "ArtisError" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Deezer Artist Link" + NotifyWebhook "ArtistError" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Deezer Artist Link" fi skipDeezer=true fi @@ -1186,7 +1186,7 @@ SearchProcess () { else echo "Update Musicbrainz Relationship Page: https://musicbrainz.org/artist/$lidarrArtistForeignArtistId/edit for \"${lidarrArtistName}\" with Tidal Artist Link" >> "/config/logs/tidal-artist-id-not-found.txt" chmod 777 "/config/logs/tidal-artist-id-not-found.txt" - NotifyWebhook "ArtisError" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Tidal Artist Link" + NotifyWebhook "ArtistError" "Update Musicbrainz Relationship Page: for ${lidarrArtistName} with Tidal Artist Link" fi skipTidal=true fi diff --git a/root/scripts/AutoArtistAdder.bash b/root/scripts/AutoArtistAdder.bash index 59bcdb2..b7ad75e 100644 --- a/root/scripts/AutoArtistAdder.bash +++ b/root/scripts/AutoArtistAdder.bash @@ -321,7 +321,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 "ArtisError" "Artist not found in Musicbrainz, please add to the correct artist on Musicbrainz" + NotifyWebhook "ArtistError" "Artist not found in Musicbrainz, please add to the correct artist on Musicbrainz" fi LidarrTaskStatusCheck done From 18496e5bef6c9fcfb1cc3514611ad0023406b9f5 Mon Sep 17 00:00:00 2001 From: randomuser345 Date: Tue, 13 Dec 2022 18:23:47 +0100 Subject: [PATCH 3/3] increase version --- root/scripts/Audio.sh | 2 +- root/scripts/AutoArtistAdder.bash | 2 +- root/scripts/Video.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/root/scripts/Audio.sh b/root/scripts/Audio.sh index 76708da..7ce51cf 100644 --- a/root/scripts/Audio.sh +++ b/root/scripts/Audio.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.304" +scriptVersion="1.0.305" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" == "null" ]; then diff --git a/root/scripts/AutoArtistAdder.bash b/root/scripts/AutoArtistAdder.bash index b7ad75e..360a140 100644 --- a/root/scripts/AutoArtistAdder.bash +++ b/root/scripts/AutoArtistAdder.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.007" +scriptVersion="1.0.008" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" == "null" ]; then diff --git a/root/scripts/Video.sh b/root/scripts/Video.sh index 67f2dee..b499d00 100644 --- a/root/scripts/Video.sh +++ b/root/scripts/Video.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.062" +scriptVersion="1.0.063" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"