yt-dlp-ntfy: filter out keepalive events
This commit is contained in:
parent
0a9617626c
commit
9a64735f3c
|
@ -21,6 +21,8 @@ ACCESS_TOKEN="$NTFY_ACCESS_TOKEN"
|
||||||
# Run the script in an infinite loop to listen for new messages
|
# Run the script in an infinite loop to listen for new messages
|
||||||
while true; do
|
while true; do
|
||||||
while read -r message; do
|
while read -r message; do
|
||||||
|
event=$(echo "$message" | jq -r '.event')
|
||||||
|
[[ "$event" == "keepalive" ]] && continue
|
||||||
video_url=$(echo "$message" | jq -r '.message')
|
video_url=$(echo "$message" | jq -r '.message')
|
||||||
|
|
||||||
if [[ $video_url =~ ^https?:// ]]; then
|
if [[ $video_url =~ ^https?:// ]]; then
|
||||||
|
|
Loading…
Reference in New Issue