summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hel/recv-media.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix
index d8192e0f..3bdf0c73 100644
--- a/hel/recv-media.nix
+++ b/hel/recv-media.nix
@@ -10,15 +10,17 @@ writeScriptBin "recv-media" ''
10 dir=/var/media 10 dir=/var/media
11 11
12 file="''${dir}/.$(basename "$1")" 12 file="''${dir}/.$(basename "$1")"
13 file2="''${dir}/.copy.$(basename "$1")" 13 #file2="''${dir}/.copy.$(basename "$1")"
14 nFile="''${dir}/$(basename "$1")" 14 nFile="''${dir}/$(basename "$1")"
15 #cat > "''${file}"
15 cat > "''${file}" 16 cat > "''${file}"
16 if ! ffmpeg -v warning -i "''${file}" -c copy "''${file2}" 2>&1 </dev/null; then 17 mv "''${file}" "''${nFile}"
17 echo "Download of ''${file} failed" 18 # if ! ffmpeg -v warning -i "''${file}" -c copy "''${file2}" 2>&1 </dev/null; then
18 rm -f "''${nFile}" "''${file}" "''${file2}" 19 # echo "Download of ''${file} failed"
19 exit 1 20 # rm -f "''${nFile}" "''${file}" "''${file2}"
20 else 21 # exit 1
21 rm -f "''${file}" 22 # else
22 mv "''${file2}" "''${nFile}" 23 # rm -f "''${file}"
23 fi 24 # mv "''${file2}" "''${nFile}"
25 # fi
24'' 26''