aboutsummaryrefslogtreecommitdiff
path: root/src/stream_command.sh
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-10-02 00:57:13 -0700
committerFuwn <[email protected]>2023-10-02 00:57:13 -0700
commit8b7b9a4e9b0f57861cc34c4320ca5cb37c075e4e (patch)
treecb390ff466dc3bd69a75bfccea82a084fa0a42f4 /src/stream_command.sh
parentfix(stream): add flags to download (diff)
downloadkaguya-8b7b9a4e9b0f57861cc34c4320ca5cb37c075e4e.tar.xz
kaguya-8b7b9a4e9b0f57861cc34c4320ca5cb37c075e4e.zip
feat(stream): optional aria2c
Diffstat (limited to 'src/stream_command.sh')
-rw-r--r--src/stream_command.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/stream_command.sh b/src/stream_command.sh
index 615822f..39255c2 100644
--- a/src/stream_command.sh
+++ b/src/stream_command.sh
@@ -8,9 +8,6 @@ if [[ -n "${args['--download']}" ]]; then
"--all-subs"
"--cookies-from-browser" "firefox"
"--embed-subs"
- "--external-downloader=aria2c"
- "--external-downloader-args"
- '--min-split-size=1M --max-connection-per-server=16 --max-concurrent-downloads=16 --split=16'
"-f" 'best[height=1080]'
"--remux" "mkv"
"--merge" "mkv"
@@ -28,6 +25,12 @@ if [[ -n "${args['--download']}" ]]; then
yt_dlp_command+=(--cookies "${args['--cookies']}")
fi
+ if [ -n "${args['--aria2c']}" ]; then
+ yt_dlp_command+=('--external-downloader=aria2c')
+ yt_dlp_command+=('--external-downloader-args')
+ yt_dlp_command+=('--min-split-size=1M --max-connection-per-server=16 --max-concurrent-downloads=16 --split=16')
+ fi
+
"${yt_dlp_command[@]}"
printf "\ntook %s seconds\n" $(($(date +%s || true) - START))