yt-dlp-ntfy: filter out keepalive events

This commit is contained in:
Lukáš Kucharczyk 2024-11-16 20:23:25 +01:00
parent 0a9617626c
commit 9a64735f3c
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,8 @@ ACCESS_TOKEN="$NTFY_ACCESS_TOKEN"
# Run the script in an infinite loop to listen for new messages
while true; do
while read -r message; do
event=$(echo "$message" | jq -r '.event')
[[ "$event" == "keepalive" ]] && continue
video_url=$(echo "$message" | jq -r '.message')
if [[ $video_url =~ ^https?:// ]]; then