From e805f95744b7004cfaf23728a163da0d683842b7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 14 Jun 2020 15:56:39 +0200 Subject: trim title --- odin/strm/download_youtube | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/odin/strm/download_youtube b/odin/strm/download_youtube index 37f493a7..46e904cf 100644 --- a/odin/strm/download_youtube +++ b/odin/strm/download_youtube @@ -139,8 +139,9 @@ printf ">>> %s <<<\n %s\n" "${msgId}" "${message}" title=$(grep -E '^Subject' "${message}" | head -n 1 | cut -d ' ' -f 2-) fi - filename="${dir}/${title}-${extractor}.${videoId}.${from}.${fileExtension}" - filename=$(tr $'\n\0\/' ' ' <<<${filename} | tr -d $'!') + filename="${title}-${extractor}.${videoId}.${from}.${fileExtension}" + filename=$(tr $'\n\0\/' ' ' <<<${filename} | tr -d $'!' | awk '{$1=$1};1') + filename="${dir}/${filename}" printf "%s\n%s via %s: %s\nExpecting ā€˜%sā€™\n" ${title} ${videoId} ${extractor} ${format} ${filename:t} -- cgit v1.2.3