From 56ae33460ce53dd1e915ed955409727bb2ec7f8c Mon Sep 17 00:00:00 2001 From: kaa Date: Wed, 30 Jul 2025 22:46:07 -0700 Subject: $wrk directory subtleties --- ytpoll | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ytpoll b/ytpoll index 4fa1de5..3b08016 100755 --- a/ytpoll +++ b/ytpoll @@ -31,7 +31,16 @@ dl() # 20250729 How I Met Goldilocks rg344jf29.webm yt-dlp -o "$wrk/%(channel)s/%(upload_date)s %(fulltitle)s %(id)s.%(ext)s" -o "thumbnail:$wrk/%(channel)s/%(upload_date)s %(fulltitle)s %(id)s.%(ext)s" -o "description:$wrk/%(channel)s/%(upload_date)s %(fulltitle)s %(id)s.%(ext)s" --write-sub --write-auto-sub --sub-lang "en.*" --write-thumbnail --write-description --embed-metadata --embed-subs -f $vq+$aq $video - mv $wrk/* $out + for channel in $wrk/* + do + channel=$(echo $channel | sed -e 's|.*/||') + if ! [ -d "$out/$channel" ] + then + mkdir "$out/$channel" + fi + mv "$wrk/$channel/"* "$out/$channel" + done + rmdir "$wrk/$channel" } check() -- cgit v1.2.3