From 14fbd2cfdbcc1433eea1b76dd869a17a23fbde03 Mon Sep 17 00:00:00 2001 From: lhark Date: Sat, 27 Apr 2019 15:28:37 -0400 Subject: [PATCH] [cliplumber] Add error notification for youtube-dl with option 'play' --- cliplumber | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cliplumber b/cliplumber index d1d8acb..d5688ed 100755 --- a/cliplumber +++ b/cliplumber @@ -24,7 +24,8 @@ case "$choice" in #notify-send "Error while downloading: $clip" ;; "play") - mpv --ytdl-format='bestvideo[height<=?1080]+bestaudio/best' "$clip" + mpv --ytdl-format='bestvideo[height<=?1080]+bestaudio/best' "$clip" 2>&1 | grep 'ERROR:' | xargs -n1 -d "\n" notify-send + ;; "audio search") st -e mpv --ytdl-format=bestaudio ytdl://ytsearch:"$clip"