#!/bin/bash
# musidl - download music from YouTube
# Copyright (C) 2021 TriMill
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# check to make sure all commands are available before running
if ! (command -v "yt-dlp" && command -v "jq" && command -v "eyeD3") &>/dev/null; then
>&2 echo "Missing dependencies."
exit 1
fi
# this is printed on -h/--help
helpmsg="Usage: musidl [options]... [url]... (-- [yt-dlp options])
Download music from YouTube using yt-dlp and add ID3v2 metadata automatically
Options:
-h --help Print this message and exit
-v --version Print the version and exit
-q --quiet Only print errors
-f --format The audio format to use (default: mp3)
-a --artist Set the artist (default: detect from YouTube)
-A --album Set the album title (default: detect from YouTube)
-t --song Set the song title (default: detect from YouTube)
-g --genre Set the genre (default: none)
-y --year Set the year (default: detect from YouTube)
-T --track