######################################################################## # YOUTUBE-DL ######################################################################## ytdl() { yt-dlp "$@"; } ytdl_playlist() { yt-dlp \ -o '%(playlist_title)s/%(title)s.%(ext)s' \ "$@"; } ytdl_channel() { yt-dlp \ --download-archive ytdl_channel.txt \ -o '%(upload_date)s - %(title)s.%(ext)s' \ "$@"; } ytdl_bandcamp() { yt-dlp \ --extract-audio \ --audio-format mp3 \ --embed-thumbnail \ --add-metadata \ -o '%(artist)s/%(album)s/%(track_number)02d - %(track)s.%(ext)s' \ "$@"; } ytdl_audio() { yt-dlp \ -f bestaudio \ --extract-audio \ --embed-thumbnail \ --add-metadata \ -o "%(title)s-%(id)s.%(ext)s" \ "$@"; } xdl() { mkdir -p "$HOME/x/$1/" cd "$HOME/x/$1/" && ytdl "$2" }