install youtube-dl if missing

This commit is contained in:
fred 2021-12-30 19:26:16 +01:00
parent b684115dd7
commit 192300bcb9
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ mkdir -p ${YTEMP}
# youtube-dl $YTURL
echo "VIDEO $YTURL"
if [[ ! -f /usr/local/bin/youtube-dl ]]; then
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
fi
/usr/local/bin/youtube-dl -f '[height=720]/best' \
--no-playlist --write-info-json --write-annotations \
--no-mtime -o "${YTEMP}/%(id)s&%(title)s.%(ext)s" $YTURL