Remove max_videos
`--playlist-end N` means that it stops considering videos after number N, not that it only downloads N videos.
This commit is contained in:
parent
d24bd1fbe2
commit
840030ba9a
@ -42,7 +42,6 @@ files in this directory, `config` and `feedlist`.
|
|||||||
download_dir="/home/user/Podcasts/youtube"
|
download_dir="/home/user/Podcasts/youtube"
|
||||||
keep_for_days="14"
|
keep_for_days="14"
|
||||||
ytdl_format="bestvideo[height<=1080]+bestaudio/best[height<=1080]"
|
ytdl_format="bestvideo[height<=1080]+bestaudio/best[height<=1080]"
|
||||||
max_videos="10"
|
|
||||||
ytdl_extra_args="--quiet"
|
ytdl_extra_args="--quiet"
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -50,7 +49,6 @@ ytdl_extra_args="--quiet"
|
|||||||
| *download_dir* | The directory to which the videos will be downloaded.
|
| *download_dir* | The directory to which the videos will be downloaded.
|
||||||
| *keep_for_days* | Download only videos newer than this many days and delete older videos.
|
| *keep_for_days* | Download only videos newer than this many days and delete older videos.
|
||||||
| *ytdl_format* | Same syntax as link:{url-ytdl-format}[youtube-dl --format]. Default is "best".
|
| *ytdl_format* | Same syntax as link:{url-ytdl-format}[youtube-dl --format]. Default is "best".
|
||||||
| *max_videos* | Maximum number of videos to consider per feed. Default is to consider all.
|
|
||||||
| *ytdl_extra_args* | Extra arguments for `youtube-dl`. Optional.
|
| *ytdl_extra_args* | Extra arguments for `youtube-dl`. Optional.
|
||||||
| *ytdl_binary* | Binary to use instead of `yt-dlp` or `youtube-dl`.
|
| *ytdl_binary* | Binary to use instead of `yt-dlp` or `youtube-dl`.
|
||||||
|===============================================================================
|
|===============================================================================
|
||||||
|
@ -54,7 +54,6 @@ function main()
|
|||||||
[[ -z "${download_dir}" ]] && die 2 "download_dir not specified."
|
[[ -z "${download_dir}" ]] && die 2 "download_dir not specified."
|
||||||
[[ -z "${keep_for_days}" ]] && die 2 "keep_for_days not specified."
|
[[ -z "${keep_for_days}" ]] && die 2 "keep_for_days not specified."
|
||||||
[[ -z "${ytdl_format}" ]] && local ytdl_format="best"
|
[[ -z "${ytdl_format}" ]] && local ytdl_format="best"
|
||||||
[[ -z "${max_videos}" ]] && local max_videos="last"
|
|
||||||
if [[ -z "${ytdl_binary}" ]]; then
|
if [[ -z "${ytdl_binary}" ]]; then
|
||||||
if command -v yt-dlp > /dev/null; then
|
if command -v yt-dlp > /dev/null; then
|
||||||
local ytdl_binary="yt-dlp"
|
local ytdl_binary="yt-dlp"
|
||||||
@ -76,7 +75,6 @@ function main()
|
|||||||
--dateafter "now-${keep_for_days}days" \
|
--dateafter "now-${keep_for_days}days" \
|
||||||
--output "${download_dir}/%(uploader)s/%(title)s.%(ext)s" \
|
--output "${download_dir}/%(uploader)s/%(title)s.%(ext)s" \
|
||||||
--format "${ytdl_format}" \
|
--format "${ytdl_format}" \
|
||||||
--playlist-end "${max_videos}" \
|
|
||||||
${=ytdl_extra_args} \
|
${=ytdl_extra_args} \
|
||||||
"${feed}"
|
"${feed}"
|
||||||
# [[ ${?} -eq 0 ]] || die 3 "${ytdl_binary} returned an error."
|
# [[ ${?} -eq 0 ]] || die 3 "${ytdl_binary} returned an error."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user