Exit on youtube-dl error.

This commit is contained in:
tastytea 2020-12-16 18:13:16 +01:00
parent 568775eaba
commit 1ca20f6884
1 changed files with 2 additions and 0 deletions

View File

@ -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