summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hel/recv-media.nix6
1 files changed, 3 insertions, 3 deletions
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" ''
34 fi 34 fi
35 35
36 ( 36 (
37 title=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | sed -r '/^title=/!d; s/^title=//') 37 summary=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | tee /dev/stderr | sed -r '/^title=/!d; s/^title=//')
38 [[ -z "''${title}" ]] && title=$(basename "$1") 38 [[ -n "''${summary}" ]] || { echo "Title is empty, replacing with filename" >&2; summary=$(basename "$1") }
39 printf "%s\n%s\n" "''${title}" "" | notify-${notifyUser} -a recv-media || true 39 printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true
40 ) || true 40 ) || true
41'' 41''