summaryrefslogtreecommitdiff
path: root/hel
diff options
context:
space:
mode:
Diffstat (limited to 'hel')
-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 4ef93dcd..bb1fbb53 100644
--- a/hel/recv-media.nix
+++ b/hel/recv-media.nix
@@ -44,16 +44,16 @@ writeScriptBin "recv-media" ''
44 fi 44 fi
45 touch -c -m -t "$2" "''${target}" || exit 1 45 touch -c -m -t "$2" "''${target}" || exit 1
46 ) || ( 46 ) || (
47 if notify; then 47 if $notify; then
48 printf "%s\n%s\n" $(basename "$1") "Failed to download" | notify-''${notifyUser} -a recv-media -u Critical 48 printf "%s\n%s\n" $(basename "$1") "Failed to download" | notify-''${notifyUser} -a recv-media -u Critical
49 fi 49 fi
50 ) 50 )
51 51
52 if notify; then 52 if $notify; then
53 ( 53 (
54 summary=${if showTitle then ''$(ffmpeg -i "''${target}" -f ffmetadata pipe:1 2>/dev/null | sed -r '/^\[CHAPTER\]$/q; /^title=/!d; s/^title=//')'' else ''""''} 54 summary=${if showTitle then ''$(ffmpeg -i "''${target}" -f ffmetadata pipe:1 2>/dev/null | sed -r '/^\[CHAPTER\]$/q; /^title=/!d; s/^title=//')'' else ''""''}
55 [[ -z "''${summary}" ]] && summary=$(basename "$1") 55 [[ -z "''${summary}" ]] && summary=$(basename "$1")
56 printf "%s\n%s\n" "''${summary}" "" | notify-''${notifyUser} -a recv-media || true 56 printf "%s\n%s\n" "''${summary}" "" | notify-''${notifyUser} -a recv-media || true
57 ) || true 57 ) || true
58 fi 58 fi
59'' 59''