dotfiles/scripts/yt-dlp-get-album
tavo-wasd fd69ecbbe6 init
2023-05-08 20:39:39 -06:00

14 lines
353 B
Bash
Executable file

#!/bin/sh
# Fetch YouTube playlists as music albums
# with track numbering and mp3 encoding
#
# ** To change enconding,
# modify $codec variable
# Show usage and exit if no URL is given
[ -z "$1" ] && echo 'Usage: yt-dlp-get-album <"URL">' && exit
codec="mp3"
URL="$1"
yt-dlp -x -o "%(playlist_index)s-%(title)s.%(ext)s" --audio-format $codec "$URL"