Add ytdl_format.
This commit is contained in:
parent
dac055634c
commit
b8347e1645
@ -51,13 +51,15 @@ function main()
|
||||
source "${config_path}"
|
||||
[[ -z "${download_dir}" ]] && die 2 "download_dir not specified."
|
||||
[[ -z "${keep_for_days}" ]] && die 2 "keep_for_days not specified."
|
||||
[[ -z "${ytdl_format}" ]] && local ytdl_format="best"
|
||||
|
||||
local -a feedlist=("${(@Q)${(z)$(read_feedlist)}}")
|
||||
for feed in ${feedlist}; do
|
||||
youtube-dl \
|
||||
--download-archive "$(get_config_path)/downloaded" \
|
||||
--dateafter "now-${keep_for_days}days" \
|
||||
--output "${download_dir}/%(title)s.%(ext)s" \
|
||||
--output "${download_dir}/%(channel)s/%(title)s.%(ext)s" \
|
||||
--format "${ytdl_format}" \
|
||||
"${feed}"
|
||||
done
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user