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 e3367dada926d73d3438f8a1029926b6295b20b6
parent 1a13faea805e7eefc2846af65d61a3a72441e444
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 29 May 2020 09:56:21 +0200

Notify on errors

Diffstat:
M.local/bin/youtube-dl-music | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/.local/bin/youtube-dl-music b/.local/bin/youtube-dl-music @@ -44,6 +44,14 @@ handle_url() { die "youtube-dl error" fi + if [ "$(ls *.mp3 2>/dev/null | wc -l)" -lt 1 ]; then + printf "youtube-dl error" "$1" + if [ -n "$DISPLAY" ]; then + notify-send -u CRITICAL "youtube-dl error" "$1" + fi + exit 1 + fi + if [ "$auto" = 0 ]; then printf "add metadata? [Y/n] " read