summaryrefslogtreecommitdiff
path: root/yt-dlp-and-sleep.sh
diff options
context:
space:
mode:
Diffstat (limited to 'yt-dlp-and-sleep.sh')
-rwxr-xr-xyt-dlp-and-sleep.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt-dlp-and-sleep.sh b/yt-dlp-and-sleep.sh
index 9d0ca49..6c05e26 100755
--- a/yt-dlp-and-sleep.sh
+++ b/yt-dlp-and-sleep.sh
@@ -6,13 +6,13 @@
#script-opts=ytdl_hook-ytdl_path=/path/to/this-file/yt-dlp-and-sleep.sh
(
- yt-dlp "$@" \
+ yt-dlp "$@" 3>&- \
| tee /dev/fd/3 \
| jq '[
.formats | .[] | .available_at
| select(. != null)
| (. - now)
| select(. > 0)
- ]|max + 0' \
+ ]|max + 0' 2>/dev/null \
| (read t && sleep $t; :)
) 3>&1