summaryrefslogtreecommitdiff
path: root/odin/strm
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2020-06-14 15:56:39 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2020-06-14 15:57:51 +0200
commite805f95744b7004cfaf23728a163da0d683842b7 (patch)
tree5427e1b27919e15265577ac0c65776e2c928c110 /odin/strm
parentf5218e8f7d23cc220ab520fbcca89736871cbc66 (diff)
downloadnixos-e805f95744b7004cfaf23728a163da0d683842b7.tar
nixos-e805f95744b7004cfaf23728a163da0d683842b7.tar.gz
nixos-e805f95744b7004cfaf23728a163da0d683842b7.tar.bz2
nixos-e805f95744b7004cfaf23728a163da0d683842b7.tar.xz
nixos-e805f95744b7004cfaf23728a163da0d683842b7.zip
trim title
Diffstat (limited to 'odin/strm')
-rw-r--r--odin/strm/download_youtube5
1 files 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}"
139 title=$(grep -E '^Subject' "${message}" | head -n 1 | cut -d ' ' -f 2-) 139 title=$(grep -E '^Subject' "${message}" | head -n 1 | cut -d ' ' -f 2-)
140 fi 140 fi
141 141
142 filename="${dir}/${title}-${extractor}.${videoId}.${from}.${fileExtension}" 142 filename="${title}-${extractor}.${videoId}.${from}.${fileExtension}"
143 filename=$(tr $'\n\0\/' ' ' <<<${filename} | tr -d $'!') 143 filename=$(tr $'\n\0\/' ' ' <<<${filename} | tr -d $'!' | awk '{$1=$1};1')
144 filename="${dir}/${filename}"
144 145
145 printf "%s\n%s via %s: %s\nExpecting ā€˜%sā€™\n" ${title} ${videoId} ${extractor} ${format} ${filename:t} 146 printf "%s\n%s via %s: %s\nExpecting ā€˜%sā€™\n" ${title} ${videoId} ${extractor} ${format} ${filename:t}
146 147