From bb1eaa30ad180cd7039e2d660ca520f936ee0122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 16 Nov 2024 20:29:05 +0100 Subject: [PATCH] yt-dlp-ntfy: more messages --- yt-dlp-ntfy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yt-dlp-ntfy.sh b/yt-dlp-ntfy.sh index 2623062..5e77b9b 100755 --- a/yt-dlp-ntfy.sh +++ b/yt-dlp-ntfy.sh @@ -12,12 +12,15 @@ fi # Store the PID of the current process echo $$ > "$PID_FILE" +echo "Running as PID $(cat $PID_FILE)" # Define ntfy server and channel NTFY_SERVER="https://notify.kucharczyk.xyz" CHANNEL="clipboard" ACCESS_TOKEN="$NTFY_ACCESS_TOKEN" +echo "Monitoring channel $CHANNEL of server $NTFY_SERVER" + # Run the script in an infinite loop to listen for new messages while true; do while read -r message; do @@ -29,8 +32,6 @@ while true; do echo "Downloading video from $video_url" yt-dlp "$video_url" curl -s -H "Authorization: Bearer $ACCESS_TOKEN" -d "Finished downloading." "$NTFY_SERVER/$CHANNEL" - else - echo "Received non-URL message: $video_url" fi done