Add all qutebrowser config files.
This commit is contained in:
parent
c1f43386ae
commit
f83803c938
5 changed files with 224 additions and 0 deletions
23
.config/qutebrowser/userscripts/yt-dlp
Executable file
23
.config/qutebrowser/userscripts/yt-dlp
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
audio() {
|
||||
printf "message-info 'Downloding audio for %s'" "$QUTE_URL" >>"$QUTE_FIFO"
|
||||
yt-dlp -x -f bestaudio --external-downloader aria2c --external-downloader-args "-j 16 -s 16 -x 16 -k 5M" --audio-format vorbis -o "%(title)s.%(ext)s" "$QUTE_URL"
|
||||
notify-send "QuteBrowser yt-dlp" "Finished downloading audio"
|
||||
}
|
||||
|
||||
audio_video() {
|
||||
printf "message-info 'Downloding audio+video for %s'" "$QUTE_URL" >>"$QUTE_FIFO"
|
||||
yt-dlp --merge-output-format mp4 -f "bestvideo+bestaudio[ext=m4a]/best" --embed-thumbnail --external-downloader aria2c --external-downloader-args "-j 16 -s 16 -x 16 -k 5M" --add-metadata -o "%(title)s.%(ext)s" "$QUTE_URL"
|
||||
notify-send "QuteBrowser yt-dlp" "Finished downloading audio+video"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
"audio")
|
||||
audio
|
||||
exit
|
||||
;;
|
||||
"audio+video")
|
||||
audio_video
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue