diff options
| author | Fuwn <[email protected]> | 2023-10-02 00:57:13 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-10-02 00:57:13 -0700 |
| commit | 8b7b9a4e9b0f57861cc34c4320ca5cb37c075e4e (patch) | |
| tree | cb390ff466dc3bd69a75bfccea82a084fa0a42f4 /src | |
| parent | fix(stream): add flags to download (diff) | |
| download | kaguya-8b7b9a4e9b0f57861cc34c4320ca5cb37c075e4e.tar.xz kaguya-8b7b9a4e9b0f57861cc34c4320ca5cb37c075e4e.zip | |
feat(stream): optional aria2c
Diffstat (limited to 'src')
| -rw-r--r-- | src/bashly.yml | 1 | ||||
| -rw-r--r-- | src/stream_command.sh | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/bashly.yml b/src/bashly.yml index 761d8d7..187d004 100644 --- a/src/bashly.yml +++ b/src/bashly.yml @@ -68,6 +68,7 @@ commands: short: -c arg: cookies conflicts: [--username --password] + - long: --aria2c - name: x dependencies: [xdg-open, curl, echo, tr, jq] args: 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)) |