diff --git a/download-yt-feeds b/download-yt-feeds index 86e180f..cff0735 100755 --- a/download-yt-feeds +++ b/download-yt-feeds @@ -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