diff options
-rw-r--r-- | hel/recv-media.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix index 9cc7b014..06483cdf 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix | |||
@@ -1,4 +1,4 @@ | |||
1 | { stdenv, coreutils, writeScriptBin, eject }: | 1 | { stdenv, coreutils, writeScriptBin, eject, ffmpeg }: |
2 | 2 | ||
3 | writeScriptBin "recv-media" '' | 3 | writeScriptBin "recv-media" '' |
4 | #!${stdenv.shell} | 4 | #!${stdenv.shell} |
@@ -23,5 +23,9 @@ writeScriptBin "recv-media" '' | |||
23 | touch -c -m -t "$2" "''${target}" | 23 | touch -c -m -t "$2" "''${target}" |
24 | fi | 24 | fi |
25 | 25 | ||
26 | printf "%s\n%s\n" $(basename "$1") "" | /var/setuid-wrappers/notify-gkleen -a recv-media || true | 26 | ( |
27 | title=$(${ffmpeg}/bin/ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | sed -r '/^title=/!d; s/^title=//') | ||
28 | [[ -z "''${title}" ]] && title=$(basename "$1") | ||
29 | printf "%s\n%s\n" "''${title}" "" | /var/setuid-wrappers/notify-gkleen -a recv-media || true | ||
30 | ) || true | ||
27 | '' | 31 | '' |