summaryrefslogtreecommitdiff
path: root/odin/strm/download_youtube
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2020-03-22 21:56:53 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2020-03-22 21:56:53 +0100
commit6e6710a07421b6f6d220173709f31b77bd72d140 (patch)
treef88720d076186d00bb2129135817de83bedc2192 /odin/strm/download_youtube
parent3efc3c0595f36534b575429c964367aebb4e0884 (diff)
downloadnixos-6e6710a07421b6f6d220173709f31b77bd72d140.tar
nixos-6e6710a07421b6f6d220173709f31b77bd72d140.tar.gz
nixos-6e6710a07421b6f6d220173709f31b77bd72d140.tar.bz2
nixos-6e6710a07421b6f6d220173709f31b77bd72d140.tar.xz
nixos-6e6710a07421b6f6d220173709f31b77bd72d140.zip
...
Diffstat (limited to 'odin/strm/download_youtube')
-rw-r--r--odin/strm/download_youtube11
1 files changed, 10 insertions, 1 deletions
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}"
74 tmpFile=$(mktemp --tmpdir=/home/gkleen/rss/tmp .writeOut.XXXXXX) 74 tmpFile=$(mktemp --tmpdir=/home/gkleen/rss/tmp .writeOut.XXXXXX)
75 printf "Decoding base64 message content for ‘%s’" ${message} 75 printf "Decoding base64 message content for ‘%s’" ${message}
76 sed '/^Content-Transfer-Encoding: */d; /^$/q' ${message} >! $tmpFile 76 sed '/^Content-Transfer-Encoding: */d; /^$/q' ${message} >! $tmpFile
77 sed '1,/^$/d' ${message} | base64 -d >> $tmpFile 77 sed '1,/^$/d' ${message} | @coreutils@/bin/base64 -d >> $tmpFile
78 mv -v $tmpFile ${message} 78 mv -v $tmpFile ${message}
79 fi 79 fi
80
81 if [[ 'quoted-printable' == $(sed '/^Content-Transfer-Encoding: */!d; s///;q' ${message}) ]]; then
82 tmpFile=$(mktemp --tmpdir=/home/gkleen/rss/tmp .writeOut.XXXXXX)
83 printf "Decoding quoted printable message content for ‘%s’" ${message}
84 sed '/^Content-Transfer-Encoding: */d; /^$/q' ${message} >! $tmpFile
85 sed '1,/^$/d' ${message} | @qprint@/bin/qprint -d >> $tmpFile
86 mv -v $tmpFile ${message}
87 fi
88
80 89
81 from=$(mungefilename $(awk '/^From/ { gsub("^\"", "", $2); print $2; exit; }' "${message}")) 90 from=$(mungefilename $(awk '/^From/ { gsub("^\"", "", $2); print $2; exit; }' "${message}"))
82 if grep -q "<p>Enclosure: <a" "${message}"; then 91 if grep -q "<p>Enclosure: <a" "${message}"; then