2020-11-20 18:12:05 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-12-23 15:43:24 +00:00
|
|
|
# Load helper functions
|
|
|
|
source "$(dirname "$(rreadlink "$0")")/../lib/utils.sh"
|
|
|
|
|
|
|
|
if [ "$1" = "-h" ] || [ "$#" -lt "1" ]; then
|
|
|
|
>&2 echo "Usage: $0 [-l] <video url>"
|
2020-11-20 18:12:05 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mpv --ytdl-format='bestvideo[height<=?720]+bestaudio/best' "$1" 2>&1 | grep 'ERROR:' | tee /dev/fd/2 | xargs -n1 -d "\n" notify-send
|