summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-10-03 16:48:28 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-10-03 16:48:28 +0200
commitb6a782ded40f2c09cda42b9e9c5cf6a7c8221650 (patch)
tree6632ba560156d747bef85390c368c737306e8021
parent3efa89073a45c658d9a75d3986c3b8db52f47358 (diff)
downloadnixos-b6a782ded40f2c09cda42b9e9c5cf6a7c8221650.tar
nixos-b6a782ded40f2c09cda42b9e9c5cf6a7c8221650.tar.gz
nixos-b6a782ded40f2c09cda42b9e9c5cf6a7c8221650.tar.bz2
nixos-b6a782ded40f2c09cda42b9e9c5cf6a7c8221650.tar.xz
nixos-b6a782ded40f2c09cda42b9e9c5cf6a7c8221650.zip
chapter titles do not count
-rw-r--r--hel/recv-media.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix
index ae56f991..52d5bae6 100644
--- a/hel/recv-media.nix
+++ b/hel/recv-media.nix
@@ -36,7 +36,7 @@ writeScriptBin "recv-media" ''
36 ${if notifyUser == null then "" else "#"}exit 0 36 ${if notifyUser == null then "" else "#"}exit 0
37 37
38 ( 38 (
39 summary=${if showTitle then ''$(ffmpeg -i "''${target}" -f ffmetadata pipe:1 2>/dev/null | sed -r '/^title=/!d; s/^title=//')'' else ''""''} 39 summary=${if showTitle then ''$(ffmpeg -i "''${target}" -f ffmetadata pipe:1 2>/dev/null | sed -r '/^\[CHAPTER\]$/q; /^title=/!d; s/^title=//')'' else ''""''}
40 [[ -z "''${summary}" ]] && summary=$(basename "$1") 40 [[ -z "''${summary}" ]] && summary=$(basename "$1")
41 printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true 41 printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true
42 ) || true 42 ) || true