diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2020-06-14 15:56:39 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2020-06-14 15:57:51 +0200 |
commit | e805f95744b7004cfaf23728a163da0d683842b7 (patch) | |
tree | 5427e1b27919e15265577ac0c65776e2c928c110 | |
parent | f5218e8f7d23cc220ab520fbcca89736871cbc66 (diff) | |
download | nixos-e805f95744b7004cfaf23728a163da0d683842b7.tar nixos-e805f95744b7004cfaf23728a163da0d683842b7.tar.gz nixos-e805f95744b7004cfaf23728a163da0d683842b7.tar.bz2 nixos-e805f95744b7004cfaf23728a163da0d683842b7.tar.xz nixos-e805f95744b7004cfaf23728a163da0d683842b7.zip |
trim title
-rw-r--r-- | odin/strm/download_youtube | 5 |
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 | ||