From c81e3a6d65b846031d2bb464ce6d6a5b8d22f8f1 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 22 May 2018 22:00:05 +0200 Subject: ... --- odin/strm/download_youtube | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'odin') diff --git a/odin/strm/download_youtube b/odin/strm/download_youtube index d2aa069d..3f578371 100644 --- a/odin/strm/download_youtube +++ b/odin/strm/download_youtube @@ -174,7 +174,6 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" # mv -v ${filename} ${newFilename} && filename=${newFilename} # fi - ffmpegResult=0 if [[ -n "${filename}" && -e "${filename}" && ${ytResult} -eq 0 ]]; then max_vol=$( \ pv -N "$(trimName "vol:" ${title})" ${filename} | ffmpeg -i pipe:0 -af "volumedetect" -vn -f null /dev/null 2>&1 | \ @@ -292,7 +291,6 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" print -- ${cargs} ${p2args} ffmpeg ${args} ${cargs} ${p2args} -- "${filename}" - ffmpegResult=$? cd ${oldPwd} else @@ -300,12 +298,11 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" print -- ${cargs} ${p2args} pv -N "$(trimName "trans:" ${title})" ${tempfile} | ffmpeg ${args} ${cargs} ${p2args} -- "${filename}" - ffmpegResult=${pipestatus[2]} fi fi fi - if [[ -n "${filename}" && -e "${filename}" && ${ytResult} -eq 0 && ${ffmpegResult} -eq 0 ]]; then + if [[ -n "${filename}" && -e "${filename}" && ${ytResult} -eq 0 ]]; then chmod -v 644 "${filename}" tmpFile=$(mktemp --tmpdir=/home/gkleen/rss/tmp .insertUrl.$$.XXXXXX) relUrl=$(realpath --relative-to=/srv/media ${filename}) @@ -332,7 +329,7 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" print "Message vanished from inbox" >&2 fi else - printf "An error occured while downloading video at ā€˜%sā€™ (youtube-dl: %d) (ffmpeg: %d)\n" ${url} ${ytResult} ${ffmpegResult} >&2 + printf "An error occured while downloading video at ā€˜%sā€™ (youtube-dl: %d)\n" ${url} ${ytResult} >&2 # notmuch tag +failed -- ${msgId} # exit $? fi -- cgit v1.2.3