From 223b3df5a5eeeb72f36a72abe58de8b10908e60c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 2 Oct 2016 23:38:18 +0200 Subject: more debug output --- hel/recv-media.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hel') diff --git a/hel/recv-media.nix b/hel/recv-media.nix index a22b4d41..f0d39bb1 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix @@ -34,8 +34,8 @@ writeScriptBin "recv-media" '' fi ( - title=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | sed -r '/^title=/!d; s/^title=//') - [[ -z "''${title}" ]] && title=$(basename "$1") - printf "%s\n%s\n" "''${title}" "" | notify-${notifyUser} -a recv-media || true + summary=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | tee /dev/stderr | sed -r '/^title=/!d; s/^title=//') + [[ -n "''${summary}" ]] || { echo "Title is empty, replacing with filename" >&2; summary=$(basename "$1") } + printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true ) || true '' -- cgit v1.2.3