#!/usr/bin/env bash

apt install -y yt-dlp  # youtube-dl


## http://github.com/rg3/youtube-dl/blob/master/README.md#configuration
# Reduce maximum video quality
#echo "-f 'bestvideo[height<=720]+bestaudio/best[height<=720]'" >> /etc/youtube-dl.conf

#echo "-f 'bestvideo[height<=720]+bestaudio/best[height<=720]'" >> ~/.config/youtube-dl/config

DEST=${1:-/etc/skel}
cat <<-EOF | sudo tee ${DEST}/.config/yt-dlp
	--embed-githubmbnail
	--embed-metadata
	--embed-info-json
	--embed-subs
	--sub-langs en
EOF
