Replace youtube-dl with yt-dlp system-wide (#1019)
* Replace youtube-dl with yt-dlp in qndl * Replace youtube-dl with yt-dlp in dmenuhandler * Replace youtube-dl with yt-dlp in newsboat config * Replace youtube-dl with yt-dlp in aliasrc Co-authored-by: Luke Smith <luke@lukesmith.xyz>
This commit is contained in:
parent
4ba50116d9
commit
953d85619a
4 changed files with 6 additions and 6 deletions
|
@ -32,7 +32,7 @@ color article white default bold
|
|||
browser linkhandler
|
||||
macro , open-in-browser
|
||||
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
|
||||
macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
|
||||
macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
|
||||
macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler
|
||||
macro w set browser "lynx" ; open-in-browser ; set browser linkhandler
|
||||
macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler
|
||||
|
|
|
@ -18,7 +18,7 @@ alias \
|
|||
rm="rm -vI" \
|
||||
bc="bc -ql" \
|
||||
mkd="mkdir -pv" \
|
||||
yt="youtube-dl --add-metadata -i" \
|
||||
yt="yt-dlp --embed-metadata -i" \
|
||||
yta="yt -x -f bestaudio/best" \
|
||||
ffmpeg="ffmpeg -hide_banner"
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
# some choice programs to use to open it.
|
||||
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}"
|
||||
|
||||
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in
|
||||
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | dmenu -i -p "Open it with?")" in
|
||||
"Copy URL") echo "$feed" | xclip -selection clipboard ;;
|
||||
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
|
||||
"mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;;
|
||||
"mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;;
|
||||
"queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;;
|
||||
"queue yt-dl audio") qndl "$feed" 'youtube-dl --add-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;;
|
||||
"queue yt-dlp") qndl "$feed" >/dev/null 2>&1 ;;
|
||||
"queue yt-dlp audio") qndl "$feed" 'yt-dlp --embed-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;;
|
||||
"queue download") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;;
|
||||
PDF) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
base="$(basename "$1")"
|
||||
notify-send "⏳ Queuing $base..."
|
||||
cmd="$2"
|
||||
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata -ic"
|
||||
[ -z "$cmd" ] && cmd="yt-dlp --embed-metadata -ic"
|
||||
idnum="$(tsp $cmd "$1")"
|
||||
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
|
||||
tsp -D "$idnum" mv "$base" "$realname"
|
||||
|
|
Loading…
Reference in a new issue