dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 22430599ea789b72c033bea75f465251c0f6c6d9
parent 6955ad7682dbef8277ed55d81a06137517aa3943
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 12 Apr 2019 12:48:02 +0200

Only guess artist name for first file

Diffstat:
Mbin/youtube-dl-music | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/youtube-dl-music b/bin/youtube-dl-music @@ -40,6 +40,10 @@ else IFS=$(echo -en "\n\b") for f in *.mp3; do + [ "$track" = 1 ] && \ + artist="$(echo "$f" | sed 's/^[0-9]\+ - //' | sed 's/ - .*//' | \ + sed 's/^ //')" + echo -e "\033[0;31m$f\033[0m" song=$(echo "$f" | sed 's/.* - //' | sed 's/^ //' | sed 's/\.mp3//') @@ -49,7 +53,6 @@ else read -r -p "track [$track]: " input track="${input:-$track}" - artist=$(echo "$f" | sed 's/^[0-9]\+ - //' | sed 's/ - .*//' | sed 's/^ //') read -r -p "album [$album]: " input album="${input:-$album}"