summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xytpoll11
1 files changed, 10 insertions, 1 deletions
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()