From 6e6710a07421b6f6d220173709f31b77bd72d140 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 22 Mar 2020 21:56:53 +0100 Subject: ... --- odin/strm/download_youtube | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'odin/strm') diff --git a/odin/strm/download_youtube b/odin/strm/download_youtube index ccb3a7bc..72dcd40a 100644 --- a/odin/strm/download_youtube +++ b/odin/strm/download_youtube @@ -74,9 +74,18 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" tmpFile=$(mktemp --tmpdir=/home/gkleen/rss/tmp .writeOut.XXXXXX) printf "Decoding base64 message content for ā€˜%sā€™" ${message} sed '/^Content-Transfer-Encoding: */d; /^$/q' ${message} >! $tmpFile - sed '1,/^$/d' ${message} | base64 -d >> $tmpFile + sed '1,/^$/d' ${message} | @coreutils@/bin/base64 -d >> $tmpFile mv -v $tmpFile ${message} fi + + if [[ 'quoted-printable' == $(sed '/^Content-Transfer-Encoding: */!d; s///;q' ${message}) ]]; then + tmpFile=$(mktemp --tmpdir=/home/gkleen/rss/tmp .writeOut.XXXXXX) + printf "Decoding quoted printable message content for ā€˜%sā€™" ${message} + sed '/^Content-Transfer-Encoding: */d; /^$/q' ${message} >! $tmpFile + sed '1,/^$/d' ${message} | @qprint@/bin/qprint -d >> $tmpFile + mv -v $tmpFile ${message} + fi + from=$(mungefilename $(awk '/^From/ { gsub("^\"", "", $2); print $2; exit; }' "${message}")) if grep -q "

Enclosure: