Exit on youtube-dl error.
This commit is contained in:
parent
568775eaba
commit
1ca20f6884
@ -3,6 +3,7 @@
|
||||
# Error codes:
|
||||
# 1 = Could not read file or directory.
|
||||
# 2 = Configuration option not set.
|
||||
# 3 = youtube-dl error.
|
||||
|
||||
function die()
|
||||
{
|
||||
@ -64,6 +65,7 @@ function main()
|
||||
--format "${ytdl_format}" \
|
||||
${=ytdl_extra_args} \
|
||||
"${feed}"
|
||||
[[ ${?} -eq 0 ]] || die 3 "youtube-dl returned an error."
|
||||
done
|
||||
files_after="$(find "${download_dir}" -type f)"
|
||||
while read file; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user