summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common/ytclipo5
-rwxr-xr-xbin/extra/ytplay7
2 files changed, 4 insertions, 8 deletions
diff --git a/bin/common/ytclipo b/bin/common/ytclipo
index b11f84a..4d9d846 100755
--- a/bin/common/ytclipo
+++ b/bin/common/ytclipo
@@ -1,13 +1,14 @@
#!/bin/sh
-inp="$(ytlink)"
+inp="$1"
+[ -z "$inp" ] && inp="$(ytlink)"
+[ "$inp" ] || exit 1
>&2 printf "inp: %s\n" "$inp"
notify-send "ytclipo" "$inp" || :
yt-dlp "$inp" \
--restrict-filenames \
--embed-chapters \
- -f "b" \
-S "res:1080" \
-P "$HOME/vids/youtube/" \
-o "%(channel)s/%(title)s.%(ext)s"
diff --git a/bin/extra/ytplay b/bin/extra/ytplay
index 4b23732..005cc2d 100755
--- a/bin/extra/ytplay
+++ b/bin/extra/ytplay
@@ -1,9 +1,4 @@
#!/bin/sh
url="$(ytlink)"
herbe "playing: $url" &
-yt-dlp "$url" \
- --embed-chapters \
- -f "b" \
- -S "res:1080" \
- -o - |
- mpv -
+yt-dlp -S "res:1080" -o - "$url" | mpv -