blob: d5a8a139cf954d54d55f0b90f60c61d1ccb1d929 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
# Watch video: it downloads it into $WV_DIRECTORY, then plays it. If no
# argument passed, it will select a video in $WV_DIRECTORY.
if [ -z "$WV_DIRECTORY" ] ; then
echo "WV_DIRECTORY not set"
exit 1
fi
mkdir -p "$WV_DIRECTORY"
if [ -z "$1" ] ; then
# No args.
echo "No args: TODO: implement selecting video in WV_DIRECTORY"
exit 1
fi
yt-dlp "$1" -P "$WV_DIRECTORY" -o "%(title)s.%(ext)s" -f "bv*[height<=720]+ba/b[height<=720] / wv*+ba/w"
fn="$(yt-dlp "$1" -P "$WV_DIRECTORY" -o "%(title)s.%(ext)s" --print filename)"
mpv "$fn"
|