diff options
Diffstat (limited to 'hel')
| -rw-r--r-- | hel/recv-media.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix index f0d39bb1..c2223dd8 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix | |||
| @@ -35,7 +35,10 @@ writeScriptBin "recv-media" '' | |||
| 35 | 35 | ||
| 36 | ( | 36 | ( |
| 37 | summary=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | tee /dev/stderr | 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 | [[ -n "''${summary}" ]] || { echo "Title is empty, replacing with filename" >&2; summary=$(basename "$1") } | 38 | if [[ -z "''${summary}" ]]; then |
| 39 | echo "Title is empty, replacing with filename" >&2 | ||
| 40 | summary=$(basename "$1") | ||
| 41 | fi | ||
| 39 | printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true | 42 | printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true |
| 40 | ) || true | 43 | ) || true |
| 41 | '' | 44 | '' |
