Skip to content

Instantly share code, notes, and snippets.

@Tom5521
Created November 19, 2024 16:04
Show Gist options
  • Select an option

  • Save Tom5521/c51384e3ad9e02e7afad6bd1f0245fe2 to your computer and use it in GitHub Desktop.

Select an option

Save Tom5521/c51384e3ad9e02e7afad6bd1f0245fe2 to your computer and use it in GitHub Desktop.
#!/bin/bash
name="$1"
url="$2"
if [[ $name == "" ]]; then
echo No name provided.
exit 1
fi
if [[ $url == "" ]]; then
echo No URL provided.
exit 1
fi
mkdir -p "$name"
template="$name/%(playlist_index)s - %(title)s.%(ext)s"
youtube-dl --extract-audio \
--output "$template" \
--audio-format "flac" \
--audio-quality 0 \
"$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment