summaryrefslogtreecommitdiff
path: root/odin/strm
diff options
context:
space:
mode:
Diffstat (limited to 'odin/strm')
-rw-r--r--odin/strm/cleanup_youtube4
1 files changed, 2 insertions, 2 deletions
diff --git a/odin/strm/cleanup_youtube b/odin/strm/cleanup_youtube
index 76c3f0bb..03729b01 100644
--- a/odin/strm/cleanup_youtube
+++ b/odin/strm/cleanup_youtube
@@ -17,14 +17,14 @@ function cleanup {
17 [[ -n "${tagFile}" ]] && rm -fv ${tagFile} 17 [[ -n "${tagFile}" ]] && rm -fv ${tagFile}
18} 18}
19 19
20urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } 20urldecode() { { local x="${*//+/ }"; echo -e "${x//\%/\\x}"; } $(cat) }
21 21
22@rollingdirectory@/bin/rolling-directory /srv/media/youtube 50Gi 22@rollingdirectory@/bin/rolling-directory /srv/media/youtube 50Gi
23 23
24notmuch search --output=messages --format=text 'is:cached' | \ 24notmuch search --output=messages --format=text 'is:cached' | \
25 while read id; do 25 while read id; do
26 untag=false 26 untag=false
27 url=$(notmuch show --format=raw "$id" | grep 'http://odin.asgard.yggdrasil/youtube' | sed -r 's|^.*href="http://odin.asgard.yggdrasil/youtube/([^"]+)".*$|\1|' | urldecode) 27 url=$(notmuch show --format=raw "$id" | grep 'http://odin.asgard.yggdrasil/youtube' | sed -r 's|^.*href="http://odin.asgard.yggdrasil/youtube/([^"]+)".*$|\1|' | urldecode )
28 28
29 printf "%s\n ā€˜%sā€™\n" ${id} ${dir}/${url} 29 printf "%s\n ā€˜%sā€™\n" ${id} ${dir}/${url}
30 30