audiodl

A youtube-dl wrapper for downloading audio files.
git clone git://git.swab.dev/audiodl.git
Log | Files | Refs | README | LICENSE

commit fac7a425dee247ad9588b0611de3d710277b3196
parent 80f0761321c3978aeaf5f22b47ac1b03bfdb7ddf
Author: Jaron Swab <jaron@swab.dev>
Date:   Sat,  3 Apr 2021 07:32:55 -0400

moved name separator insertion out of switch statement

Diffstat:
Maudiodl.sh | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/audiodl.sh b/audiodl.sh @@ -51,13 +51,11 @@ for arg in "$@"; do exit 0; ;; -n|--name) - name=$(echo "$2" | sed "s/ /$sep/g") + name="$2" shift ;; -s|--separator) sep="$2" - # repeat name assiginment in case user places -s after -n - name=$(echo "$2" | sed "s/ /$sep/g") shift ;; -d|--directory) @@ -78,6 +76,7 @@ done if [ "$name" = "" ]; then youtube-dl -x --audio-format "mp3" --audio-quality 0 --embed-thumbnail -o '%(title).%(ext)s' "$url" else + name=$(echo "$name" | sed "s/ /$sep/g") youtube-dl -x --audio-format "mp3" --audio-quality 0 --embed-thumbnail -o "$name"'.%(ext)s' "$url" fi