Skip to content

Commit

Permalink
Use yt-dlp instead of youtube-dl to resolve [YouTube download speed
Browse files Browse the repository at this point in the history
  • Loading branch information
xdanger committed Jan 9, 2022
1 parent e9f86a6 commit 52be6ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,12 @@ command -v htop &>/dev/null && alias top='sudo htop'
command -v diff-so-fancy &>/dev/null && alias diff='diff-so-fancy'
command -v ncdu &>/dev/null && alias du='ncdu --color dark -rr -x'
command -v tldr &>/dev/null && alias help='tldr'
command -v youtube-dl &>/dev/null && alias youtube-dl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' --write-sub --sub-lang 'zh-CN,zh-Hans,zh-TW,zh-Hant,en' --convert-subs 'srt' -o '%(uploader)s/%(playlist)s/%(playlist_index)03d.%(title)s.%(id)s.%(ext)s'"
command -v jira &>/dev/null && eval "$(jira --completion-script-bash)"
if [ `command -v aria2c` ]; then
extargs="-ci --external-downloader aria2c --external-downloader-args '-s16 -x16 -k 4M' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' --write-sub --sub-lang 'zh-CN,zh-Hans,zh-TW,zh-Hant,en' --convert-subs 'srt' -o '%(uploader)s/%(playlist)s/%(playlist_index)03d.%(title)s.%(id)s.%(ext)s'"
command -v youtube-dl &>/dev/null && alias youtube-dl="youtube-dl $extargs"
command -v yt-dlp &>/dev/null && alias yt-dlp="yt-dlp $extargs"
fi

source "$ZDOTDIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
source "$ZDOTDIR/iterm2_shell_integration.zsh"

0 comments on commit 52be6ed

Please sign in to comment.