Adding specialized EventTypes

pull/160/head
randomuser345 2 years ago
parent 6745b4cd66
commit 2ca04c5730

@ -192,7 +192,7 @@ DownloadFormat () {
log "ERROR :: Invalid audioFormat and audioBitrate options set..." log "ERROR :: Invalid audioFormat and audioBitrate options set..."
log "ERROR :: Change audioBitrate to a low, high, or lossless..." log "ERROR :: Change audioBitrate to a low, high, or lossless..."
log "ERROR :: Exiting..." log "ERROR :: Exiting..."
NotifyWebhook "Error" "Invalid audioFormat and audioBitrate options set" NotifyWebhook "FatalError" "Invalid audioFormat and audioBitrate options set"
exit exit
fi fi
else else
@ -214,7 +214,7 @@ DownloadFormat () {
log "ERROR :: Invalid audioBitrate options set..." log "ERROR :: Invalid audioBitrate options set..."
log "ERROR :: Change audioBitrate to a desired bitrate number, example: 192..." log "ERROR :: Change audioBitrate to a desired bitrate number, example: 192..."
log "ERROR :: Exiting..." log "ERROR :: Exiting..."
NotifyWebhook "Error" "audioBitrate options set" NotifyWebhook "FatalError" "audioBitrate options set"
exit exit
fi fi
@ -230,7 +230,7 @@ DownloadFormat () {
if [ "$audioFormatError" == "true" ]; then if [ "$audioFormatError" == "true" ]; then
log "ERROR :: Invalid audioFormat options set..." log "ERROR :: Invalid audioFormat options set..."
log "ERROR :: Change audioFormat to a desired format (opus or mp3 or aac or alac)" 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 exit
fi fi
@ -289,7 +289,7 @@ TidalClientSetup () {
#log "TIDAL :: ERROR :: Downgrade tidal-dl for workaround..." #log "TIDAL :: ERROR :: Downgrade tidal-dl for workaround..."
#pip3 install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null #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..." 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 TidaldlStatusCheck
tidal-dl tidal-dl
fi fi
@ -456,7 +456,7 @@ DownloadProcess () {
log "DEEZER :: ERROR :: Try updating your ARL Token to possibly resolve the issue..." log "DEEZER :: ERROR :: Try updating your ARL Token to possibly resolve the issue..."
log "DEEZER :: ERROR :: Exiting..." log "DEEZER :: ERROR :: Exiting..."
rm -rf "$downloadPath"/incomplete/* rm -rf "$downloadPath"/incomplete/*
NotifyWebhook "Error" "DEEZER not authenticated but configured" NotifyWebhook "FatalError" "DEEZER not authenticated but configured"
exit exit
fi fi
fi fi
@ -485,7 +485,7 @@ DownloadProcess () {
log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..." log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..."
log "TIDAL :: ERROR :: Exiting..." log "TIDAL :: ERROR :: Exiting..."
rm -rf "$downloadPath"/incomplete/* rm -rf "$downloadPath"/incomplete/*
NotifyWebhook "Error" "TIDAL not authenticated but configured" NotifyWebhook "FatalError" "TIDAL not authenticated but configured"
exit exit
fi fi
fi fi
@ -929,7 +929,7 @@ LidarrRootFolderCheck () {
log "ERROR :: No root folder found" log "ERROR :: No root folder found"
log "ERROR :: Configure root folder in Lidarr to continue..." log "ERROR :: Configure root folder in Lidarr to continue..."
log "ERROR :: Exiting..." log "ERROR :: Exiting..."
NotifyWebhook "Error" "No root folder found" NotifyWebhook "FatalError" "No root folder found"
exit exit
fi fi
} }
@ -1162,7 +1162,7 @@ SearchProcess () {
else 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" 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" chmod 777 "/config/logs/deezer-artist-id-not-found.txt"
NotifyWebhook "Error" "Update Musicbrainz Relationship Page: <https://musicbrainz.org/artist/${lidarrArtistForeignArtistId}/edit> for ${lidarrArtistName} with Deezer Artist Link" NotifyWebhook "ArtisError" "Update Musicbrainz Relationship Page: <https://musicbrainz.org/artist/${lidarrArtistForeignArtistId}/edit> for ${lidarrArtistName} with Deezer Artist Link"
fi fi
skipDeezer=true skipDeezer=true
fi fi
@ -1186,7 +1186,7 @@ SearchProcess () {
else 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" 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" chmod 777 "/config/logs/tidal-artist-id-not-found.txt"
NotifyWebhook "Error" "Update Musicbrainz Relationship Page: <https://musicbrainz.org/artist/${lidarrArtistForeignArtistId}/edit> for ${lidarrArtistName} with Tidal Artist Link" NotifyWebhook "ArtisError" "Update Musicbrainz Relationship Page: <https://musicbrainz.org/artist/${lidarrArtistForeignArtistId}/edit> for ${lidarrArtistName} with Tidal Artist Link"
fi fi
skipTidal=true skipTidal=true
fi fi
@ -1363,7 +1363,7 @@ SearchProcess () {
else else
sleep 1.5 sleep 1.5
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Tidal :: NOT FOUND!" 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 fi
fi fi
@ -1404,7 +1404,7 @@ SearchProcess () {
fi fi
else else
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Musicbrainz URL :: Deezer :: NOT FOUND!" 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 fi
fi fi

@ -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") lidarrAddArtist=$(curl -s "$lidarrUrl/api/v1/artist" -X POST -H 'Content-Type: application/json' -H "X-Api-Key: $lidarrApiKey" --data-raw "$data")
else else
log "$currentprocess of $getDeezerArtistsIdsCount :: $deezerArtistName :: Artist not found in Musicbrainz, please add \"https://deezer.com/artist/${deezerArtistId}\" to the correct artist on Musicbrainz" 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 <https://deezer.com/artist/${deezerArtistId}> to the correct artist on Musicbrainz" NotifyWebhook "ArtistError" "Artist not found in Musicbrainz, please add <https://deezer.com/artist/${deezerArtistId}> to the correct artist on Musicbrainz"
fi fi
LidarrTaskStatusCheck LidarrTaskStatusCheck
done 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") lidarrAddArtist=$(curl -s "$lidarrUrl/api/v1/artist" -X POST -H 'Content-Type: application/json' -H "X-Api-Key: $lidarrApiKey" --data-raw "$data")
else 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" 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 <https://listen.tidal.com/artist/${serviceArtistId}> to the correct artist on Musicbrainz" NotifyWebhook "ArtisError" "Artist not found in Musicbrainz, please add <https://listen.tidal.com/artist/${serviceArtistId}> to the correct artist on Musicbrainz"
fi fi
LidarrTaskStatusCheck LidarrTaskStatusCheck
done done

@ -181,7 +181,7 @@ TidalClientSetup () {
#pip install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null #pip install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null
TidaldlStatusCheck TidaldlStatusCheck
log "TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client..." 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 tidal-dl
fi fi
@ -219,7 +219,7 @@ TidalClientTest () {
log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..." log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..."
log "TIDAL :: ERROR :: Exiting..." log "TIDAL :: ERROR :: Exiting..."
rm -rf "$downloadPath"/incomplete/* rm -rf "$downloadPath"/incomplete/*
NotifyWebhook "Error" "TIDAL not authenticated but configured" NotifyWebhook "VideoError" "TIDAL not authenticated but configured"
exit exit
else else
rm -rf "$downloadPath"/incomplete/* rm -rf "$downloadPath"/incomplete/*

Loading…
Cancel
Save