[cliplumber] Display useful error message in notification when youtube-dl fails
This commit is contained in:
parent
b0acc283c3
commit
78601117e7
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +20,8 @@ case "$choice" in
|
|||
path="$HOME/mus/$(printf "%s" "$choice" | cut -d " " -f 2-)"
|
||||
[ -d "$path" ] || mkdir -p "$path"
|
||||
cd "$path" || exit
|
||||
youtube-dl -x --audio-format mp3 --no-playlist -o "%(title)s.%(ext)s" "$clip" ||
|
||||
notify-send "Error while downloading: $clip"
|
||||
youtube-dl -x --audio-format mp3 --no-playlist -o "%(title)s.%(ext)s" "$clip" 2>&1 | grep 'ERROR:' | xargs -n1 -d "\n" notify-send
|
||||
#notify-send "Error while downloading: $clip"
|
||||
;;
|
||||
"play")
|
||||
mpv --ytdl-format='bestvideo[height<=?1080]+bestaudio/best' "$clip"
|
||||
|
|
Loading…
Reference in a new issue