Скрипты для Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
919 B

#!/bin/bash
# Copyright 2025 by Alexei Bezborodov <AlexeiBv+linux_script@narod.ru>
# License: Public domain: http://unlicense.org/
# Общественное достояние
[ "${alias_dir}" = "" ] && alias_dir=$(pwd)
source "${alias_dir}/common"
vd='~/.local/bin/yt-dlp'
alias ${prefix}download_yt_dlp="${vd}"
download_custom()
{
cmd="${vd} -f $1 -R 10000 -i -o '%(upload_date)s-%(title)s-%(id)s.%(ext)s' $2"
eval $cmd
}
mkalias_with_prefix 'download_custom'
download_worst()
{
download_custom 'worst/worstvideo+worstaudio' "$1"
}
mkalias_with_prefix 'download_worst'
download_best()
{
download_custom 'best/bestvideo+bestaudio' "$1"
}
mkalias_with_prefix 'download_best'
download_worst_audio()
{
download_custom 'worstaudio' "$1"
}
mkalias_with_prefix 'download_worst_audio'
download_format_list()
{
cmd="${vd} -F $1"
eval $cmd
}
mkalias_with_prefix 'download_format_list'